Hi,
I want to fix a limit for my variable coordinate 1, in my case from 0 to 0.05. I proved with a while loop but it does not work not giving an error mex. This is part of my code. Thanks in advance.

so perhaps you need the while not part at the end?
Velocity 2 = Variable Coordinate 1
Real MATC "while (tx <= 0.05) -0.5*g*tx^2/nuPlus + g*h*tx/nuPlus -Up; 0"

so perhaps you need the while not part at the end?
Velocity 2 = Variable Coordinate 1
Real MATC "while (tx <= 0.05) -0.5*g*tx^2/nuPlus + g*h*tx/nuPlus -Up; 0"

Hi,
I have proved with if condition, I had already read the "while section" but it didn't work as you have written.
Regards,
Andrea

Yes, "while" would be cycling until not true anymore. Even though the expression depends on "coordinate 1" there is no implicit internal logic that would have this cycle over the coordinates. It is just evaluated at the node once and for all. "max" might be a more useful operator in this context.

Yes, "while" would be cycling until not true anymore. Even though the expression depends on "coordinate 1" there is no implicit internal logic that would have this cycle over the coordinates. It is just evaluated at the node once and for all. "max" might be a more useful operator in this context.

-Peter

Hi Peter,
In my case the domain of Coordinate 1 is 0-0.1.
-Andrea