Community Tip - Did you know you can set a signature that will be added to all your posts? Set it here! 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