Hello!
How do I evaluate the statement (attached) symbolically?
I want to get a symbol as answer and not the assigned value of it.
Best regards,
Sergey
Solved! Go to Solution.
The symbolic does not know anything about units and treats them as unknown variables. Thats the reason why the symbolic can't decide, which variable is bigger. If MPa would be negative, the max would be sigma1, if MPa is positive, the max is sigma2 and if MPa is zero, both are equal (0).
You may tell the symbolic that MPa is positive with the "assume" modifier and also add the "simplify" modifier to get the correct numeric result.
But its easier to achieve using a simple numeric evaluation.
But in case you expect the symbolic answer "sigma2" instead of "300 MPa" - there is no way to achieve this answer.
You could use the if-function or an if-statement with a text result as a workaround:
In Prime use "else" instead of "otherwise".
The symbolic does not know anything about units and treats them as unknown variables. Thats the reason why the symbolic can't decide, which variable is bigger. If MPa would be negative, the max would be sigma1, if MPa is positive, the max is sigma2 and if MPa is zero, both are equal (0).
You may tell the symbolic that MPa is positive with the "assume" modifier and also add the "simplify" modifier to get the correct numeric result.
But its easier to achieve using a simple numeric evaluation.
But in case you expect the symbolic answer "sigma2" instead of "300 MPa" - there is no way to achieve this answer.
You could use the if-function or an if-statement with a text result as a workaround:
In Prime use "else" instead of "otherwise".
Hello.
I am writing one paper and want to show in context of the example that sigma_1 is the value to use. It is just more convenient in my particular case due the frequent use of sigma_1 and sigma_2 in the text that leads to the example.
I think that "If statement" is the one to use here.
Thank you.