cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X

problem with unit=0.0 when solve quadratic equation

Atomique13
2-Guest

problem with unit=0.0 when solve quadratic equation

Hello,

I am new to Mathcad,I have been using PTC Mathcad Prime 5 since yesterday.

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.

image.png

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? 

Thank you

1 ACCEPTED SOLUTION

Accepted Solutions

For numerical result (especially with units) you may consider using a numeric solve block instead of the symbolic solver:

B.PNG

View solution in original post

2 REPLIES 2
LucMeekes
23-Emerald III
(To:Atomique13)

The symbolic processor in Mathcad (and Prime) does not know about units, it treats them as unknown variables.

You can write sol to be a function of Lp, Dp1 and Dp2, so instead of sol:=... you write sol(Lp,Dp1,Dp2):=...

Then you can evaluate sol(Lp,Dp1,Dp2)=

to get the answer.

 

Success!
Luc

For numerical result (especially with units) you may consider using a numeric solve block instead of the symbolic solver:

B.PNG

Top Tags