Community Tip - New to the community? Learn how to post a question and get help from PTC and industry experts! X
Hello everyone,
Lets say I have:
x=2 and y=5
I want to create a new variable that is going to be equal to the variable with the highest value, per say...
z=max(x,y)
and in return get 'y' not 5
but if I change the 'x' and 'y' values I want it to return whichever variable has the highest value.
PS Im new at this, maybe I am missing a simple rule of programming, not sure...
The short answer is: What you want is not possible with mathcad.
The longer answer is:
You can write a formula that will tell you which one is the larger of the two input values, but the result is not a 'variable' in the sense that (I think) you mean: The symbolic answer to a numerical comparison.
Hmm. I tried to demonstrate it was not possible, and found that it IS possible in Mathcad 11:
But I have my doubts on the usefullness of this, and on whether it works in Mathcad 15 or Prime.
Succes!
Luc
It doesn't work in Mathcad 15, so I very much doubt it works in Prime.
Here is the result obtained in the MC15 M045 and MP 3.1 versions.