Hello
I wonder, how the operator ">=" works.
As example:
I have following terms
The resulet would be 0.922
But now i want to add something:
I want that mathcad calculates s_k. And if s_k is below 2kN/m^2 it should take the term "2kN/m^2" for sk. If it is above 2kN/m^2 it should calculate it normally like in the first picture. But it says s_k=0. I don't get it
I really have no idea how to type this.. I hope somebody can help me
Solved! Go to Solution.
The operator >= is a boolean operator, it tests what the values on either side of the operator are, and then decides if the left value is larger than , or equal to the value on the right side, the result can be only one of two possible outcomes:
1: the left value is larger than or equal to the right value.
0: The left value is less than the right value.
So the result is either 1, or 0, for 'true' or 'false'.
That is why you get an s_k value of 0.
To do what you want, you have to use an if statement, and that involves a 'condition' for which you can use a boolean operator like >=.
The if statement goes like this:
if('condition','value if true', 'value if false')
an example:
result:=if(a>=3,1,2)
If a>=3, then result becomes 1, if, not, result becomes 2.
I'm sure you can apply this to your problem. If you need further help, be sure to attach your Prime worksheet, that saves typing (and errors that may come with that) for those who want to help you.
Success!
Luc
The operator >= is a boolean operator, it tests what the values on either side of the operator are, and then decides if the left value is larger than , or equal to the value on the right side, the result can be only one of two possible outcomes:
1: the left value is larger than or equal to the right value.
0: The left value is less than the right value.
So the result is either 1, or 0, for 'true' or 'false'.
That is why you get an s_k value of 0.
To do what you want, you have to use an if statement, and that involves a 'condition' for which you can use a boolean operator like >=.
The if statement goes like this:
if('condition','value if true', 'value if false')
an example:
result:=if(a>=3,1,2)
If a>=3, then result becomes 1, if, not, result becomes 2.
I'm sure you can apply this to your problem. If you need further help, be sure to attach your Prime worksheet, that saves typing (and errors that may come with that) for those who want to help you.
Success!
Luc
Hello Luc
It worked perfectly, that's what i wanted.
I will attach the worksheet in future, thanks for the tipp.
Thank you very much!
A little Sidequestion:
Untill the red line i always changed "Pa" into "kN/m^2" manually. Because i want the results in kiloNewton and not in Pascal.
Where can i change the settings that the outpot is prioritizing "kN/m^2" and not "Pa"?
I don't think you can. There is an option "Base units"
but it will break down the N also:
Incidentally, the condition on s_k can also be implemented with:
Success!
Luc
Alright, i will try this too.
Thanks again!
Marc