Community Tip - If community subscription notifications are filling up your inbox you can set up a daily digest and get all your notifications in a single email. 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
