Community Tip - Did you get called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. 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