Community Tip - Have a PTC product question you need answered fast? Chances are someone has asked it before. Learn about the community search. X
Guys, I have solved a simple equation in two different methods. Can you please tell what I am doing wrong in the 2nd method thast i am getting a different result?
Thank you
Solved! Go to Solution.
The reason is the way how multiple successive if-statements followed by an otherwise are evaluated. Otherwise only triggers if ALL if's had failed. So your variable h never gets a value and is zero - therefore the wrong result.
A workaround can be to separate the if's by a dummy line:

From Mathcad's help:
The reason is the way how multiple successive if-statements followed by an otherwise are evaluated. Otherwise only triggers if ALL if's had failed. So your variable h never gets a value and is zero - therefore the wrong result.
A workaround can be to separate the if's by a dummy line:

From Mathcad's help:
Thank you so much
-nb
