Community Tip - When posting, your subject should be specific and summarize your question. Here are some additional tips on asking a great question. X
Hello.
I had an issue using the function (if) as shown below picture, can you help me to solve it?
thank.
Solved! Go to Solution.
The comparison of sigma.c and sigma.t returns either 0 (false) or 1 (true) which of course can't be compared to 485 MPa.
You have to write it that way
BTW, you don't have to write the parentheses but I usually add them in such expressions for clarity
But you may also simply write
You may also consider using the if-function instead of the programmed if-statement
And here is yet another way to achieve the same result
Because the (σc V σt) boolean comparison returns a 0 or 1 depending on if it's true or not, and that's a unitless thing that won't be compatible with MPa.
You'll want to do if (σc > σmin V σt > σmin) instead.
The comparison of sigma.c and sigma.t returns either 0 (false) or 1 (true) which of course can't be compared to 485 MPa.
You have to write it that way
BTW, you don't have to write the parentheses but I usually add them in such expressions for clarity
But you may also simply write
You may also consider using the if-function instead of the programmed if-statement
And here is yet another way to achieve the same result
Thanks.