Community Tip - You can change your system assigned username to something more personal in your community settings. X
Hi All, I have a question regarding using the if condition inside the "add line" block, would anyone help me about this?
My target is to assign a value to the parameter "c_calculated". If logic=1, I want to use an equation to calculate the variable "c_calculated". If logic=0, I want to assign a number "c_initial" to the variable "c_calculated" . However, it seems like Mathcad does not allow me to do it in the way showing below. Would anyone tell me what is wrong with this?
Thank you!
Solved! Go to Solution.
Mathcad complains that the results have different shapes.
in the 'if' line the result is an expression, a symbolic one.
In the 'otherwise'line the result is (most probably) a simple constant.
Mathcad 15 cannot deal with that.
Observing that you're dealing with symbolics, I've revisited your original problem with as result:
And with LOGIC=0 that becomes:
Maybe this approach works for you in Mathcad 15.
Success!
Luc
There are several ways to do what you want:
Success!
Luc
Hi LucMeeks,
Thank you so much for your help! Would you advise me why I failed to get the result? This is an error message that shows up in my worksheet. Thank you!
Mathcad complains that the results have different shapes.
in the 'if' line the result is an expression, a symbolic one.
In the 'otherwise'line the result is (most probably) a simple constant.
Mathcad 15 cannot deal with that.
Observing that you're dealing with symbolics, I've revisited your original problem with as result:
And with LOGIC=0 that becomes:
Maybe this approach works for you in Mathcad 15.
Success!
Luc