In PTC Mathcad Prime 10.0.0.0 I am using an if else statement where I am comparing two variables, qu and qt with the same units, psf. However, I am getting the error that the value must be scalar. I am trying to get a return of qu or qt depending on what their values are. I would appreciate help in a solution for this.
Solved! Go to Solution.
When you defined "qu" you had type square brackets. In Prime doing so creates a matrix and so "qu" ended up being a 1x1 matrix and Prime refuses to compare a matrix (even if its just 1x1) with a scalar.
Solution is to replace the square brackets by normal parentheses.
BTW, the "min" function could be used here to achieve the very same result
When you defined "qu" you had type square brackets. In Prime doing so creates a matrix and so "qu" ended up being a 1x1 matrix and Prime refuses to compare a matrix (even if its just 1x1) with a scalar.
Solution is to replace the square brackets by normal parentheses.
BTW, the "min" function could be used here to achieve the very same result
Werner, this solved the problem. I appreciate your input, I don't use Mathcad often so I am prone to these types of mistakes. Thank you.