topic problem with unit=0.0 when solve quadratic equation in PTC Mathcad
https://community.ptc.com/t5/PTC-Mathcad/problem-with-unit-0-0-when-solve-quadratic-equation/m-p/596260#M184911
<P>Hello,</P>
<P>I am new to Mathcad,I have been using PTC Mathcad Prime 5 since yesterday.</P>
<P>I have a problem when I use solve and assume for this quadratic equation. All the variables have mm as unit. If I assume mm <> 0 then it works. The answer I am looking for is 233.41847464108950079 mm.</P>
<P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 400px;"><img src="https://community.ptc.com/t5/image/serverpage/image-id/14652iAB025A9EDE193026/image-size/medium?v=v2&px=400" role="button" title="image.png" alt="image.png" /></span></P>
<P>Ps. If I put = it shows the good answer (my bad, I was too frustrated about the if and else thing to try), but why does it show if and else? </P>
<P>Thank you</P>Fri, 01 Mar 2019 10:56:52 GMTAtomique132019-03-01T10:56:52Zproblem with unit=0.0 when solve quadratic equation
https://community.ptc.com/t5/PTC-Mathcad/problem-with-unit-0-0-when-solve-quadratic-equation/m-p/596260#M184911
<P>Hello,</P>
<P>I am new to Mathcad,I have been using PTC Mathcad Prime 5 since yesterday.</P>
<P>I have a problem when I use solve and assume for this quadratic equation. All the variables have mm as unit. If I assume mm <> 0 then it works. The answer I am looking for is 233.41847464108950079 mm.</P>
<P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 400px;"><img src="https://community.ptc.com/t5/image/serverpage/image-id/14652iAB025A9EDE193026/image-size/medium?v=v2&px=400" role="button" title="image.png" alt="image.png" /></span></P>
<P>Ps. If I put = it shows the good answer (my bad, I was too frustrated about the if and else thing to try), but why does it show if and else? </P>
<P>Thank you</P>Fri, 01 Mar 2019 10:56:52 GMThttps://community.ptc.com/t5/PTC-Mathcad/problem-with-unit-0-0-when-solve-quadratic-equation/m-p/596260#M184911Atomique132019-03-01T10:56:52ZRe: problem with unit=0.0 when solve quadratic equation
https://community.ptc.com/t5/PTC-Mathcad/problem-with-unit-0-0-when-solve-quadratic-equation/m-p/596264#M184912
<P>The symbolic processor in Mathcad (and Prime) does not know about units, it treats them as unknown variables.</P>
<P>You can write sol to be a function of Lp, Dp1 and Dp2, so instead of sol:=... you write sol(Lp,Dp1,Dp2):=...</P>
<P>Then you can evaluate sol(Lp,Dp1,Dp2)=</P>
<P>to get the answer.</P>
<P> </P>
<P>Success!<BR />Luc</P>Fri, 01 Mar 2019 11:25:44 GMThttps://community.ptc.com/t5/PTC-Mathcad/problem-with-unit-0-0-when-solve-quadratic-equation/m-p/596264#M184912LucMeekes2019-03-01T11:25:44ZRe: problem with unit=0.0 when solve quadratic equation
https://community.ptc.com/t5/PTC-Mathcad/problem-with-unit-0-0-when-solve-quadratic-equation/m-p/596276#M184913
<P>For numerical result (especially with units) you may consider using a numeric solve block instead of the symbolic solver:</P>
<P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="B.PNG" style="width: 491px;"><img src="https://community.ptc.com/t5/image/serverpage/image-id/14654i66D9E986DBC920EE/image-size/large?v=v2&px=999" role="button" title="B.PNG" alt="B.PNG" /></span></P>Fri, 01 Mar 2019 13:33:58 GMThttps://community.ptc.com/t5/PTC-Mathcad/problem-with-unit-0-0-when-solve-quadratic-equation/m-p/596276#M184913Werner_E2019-03-01T13:33:58Z