cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - If community subscription notifications are filling up your inbox you can set up a daily digest and get all your notifications in a single email. X

How does >= work?

MH_10254754
2-Explorer

How does >= work?

Hello

I wonder, how the operator ">=" works.
As example:
I have following terms

MH_10254754_1-1648040105623.png

The resulet would be 0.922
But now i want to add something:

MH_10254754_2-1648040206500.png

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

 

ACCEPTED SOLUTION

Accepted Solutions
LucMeekes
23-Emerald III
(To:MH_10254754)

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

View solution in original post

4 REPLIES 4
LucMeekes
23-Emerald III
(To:MH_10254754)

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:

MH_10254754_0-1648043019337.png

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"?

LucMeekes
23-Emerald III
(To:MH_10254754)

I don't think you can. There is an option "Base units"

LucMeekes_1-1648046217581.png

but it will break down the N also:

LucMeekes_2-1648046249879.png

Incidentally, the condition on s_k can also be implemented with:

LucMeekes_0-1648045958943.png

 

Success!
Luc

 

Alright, i will try this too.

Thanks again!

 

Marc

Announcements

Top Tags