Community Tip - Learn all about PTC Community Badges. Engage with PTC and see how many you can earn! 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