Community Tip - You can Bookmark boards, posts or articles that you'd like to access again easily! X
MathCAD newbie here so apologies in advance if this is a dumb question,
Is it possible to have a conditional statement inside a solve block? I have a problem setup that I am trying to solve for a variable. But not sure i set it up correctly.
I have a conditional statement inside the solve block, and getting error
Guidance would be appreciated
Convert your if statement to a function and get it out of the solve block.
The problem is not the conditional statement - the error is thrown because you are using an undefined variable xi.
While personally I would prefer Freds solution, here is an alternative approach. You can make xi a searched for variable, too:
As you are not interested in xi you may also finish the solve block with
As already said, I would rather recommend Freds Solution.
WE
BTW, no need to crosspost -> If statement in a solveblock
Here an approach without using xi at all, rearranging the equation and using the conditional statement directly in the equation.
or
Nonetheless, I'd still vote for Fred 😉
WE