Community Tip - When posting, your subject should be specific and summarize your question. Here are some additional tips on asking a great question. X
Dear PTC Mathcad Community,
I want to ask for clarification on the behaviour of units and symbolic substitution in Mathcad Prime (similar topics have already been raised, but I still haven't found an appropriate answer for my issue).
So I try to find a symbolic expression for epsilon_c2, which is a parameter of the equation N.
Solver succeeded with the issue, but with incompatible units (see picture)
So, I have tried to find out the solution in the community, but the advice of @Werner_E with calculation options didn't resolve the issue (see the picture)
So my issues are:
1. How to make the symbolic solving more "seamless" with appropriate units' manipulation in the solutions?
2. Why does Mathcad not see the assigned values of the epsilon_c2 obtained in the previous solution?
After some time, when the file has been refreshed, some magic happened, and now I can use the roots of epsilon c1 and c2 in a "normal" manner.
But the next issue is that it doesn't let me substitute the obtained symbolic solution into the following step calculation for the moment M calculation.
As it can be seen, the factual equation is real, with proper units,
Nevertheless, Mathcad is still not satisfied with...
I am still convinced of Mathcad's power, but each time I get stuck with such a misunderstanding of Mathcad logic, I feel broken, exhausted and unable to continue to the next step - automation of my manual solution.
Any clarification, examples, or references to documentation would be greatly appreciated.
I am trying to align my workflow with my Mathcad Prime 10.0.0.0 internal logic rather than fight against it.
Thank you very much for your time and support.
The file with the manual calculation of M is attached.
Solved! Go to Solution.
@Werner_E wrote:I want to choose only the minimal real root, otherwise to assign, let it be ec2=0.
I understand that you want to use zero if all values are non-real.
Do you also want to use the minimum of all real values if it is positive?
I want to assign ec2 the minimum root value if the root is a real number, otherwise ec2 will be zero.
@Ivan_Pat wrote:
@Werner_E wrote:
I want to choose only the minimal real root, otherwise to assign, let it be ec2=0.
I understand that you want to use zero if all values are non-real.
Do you also want to use the minimum of all real values if it is positive?
I want to assign ec2 the minimum root value if the root is a real number, otherwise ec2 will be zero.
OK, so the minimum could be positive as well.
Here is a special "Min" function which should do the job.
First all non-reals are replaced by NaN's.
Then we try to delete these NaN's using "filterNaN". This functions fails if either no NaN was found or if all values are NaN's. In this case the vector remains unchanged.
Fortunately "min" returns a zero if the vectors contains only NaN's which is exactly what you want to see if all values are non-real.
Prime 10 sheet attached
It seems exactly what I need, Werner!
Thank you very much for your patience.
I'll try it and share my feedback.
