Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Really simple problem...... IF function???? 1

Status
Not open for further replies.

LJG

Mechanical
Jul 10, 2003
1
I cannot believe that there isn't a block for an IF command or a high value wins block. All I want to do is only allow the highest value to pass through to the output i.e.

Input x and y. IF x>y then output is x but if y>x then the output is y.

I have been through the library and can't find anything but surely you must be able to do this using a Simulink block...

Hope someone can help...
 
Replies continue below

Recommended for you

Why can't you used the MinMax math operator?

TTFN
 
Perhaps you can add a block with Matlab script/function to implement it.
 
You can use the relational operator from the math operations library. there you have two inputs that you can compare.
For example if your inputs are x and y and you choose >= the block will compare x and y. If x>=y the output will be 1 if x<y the output will be 0.
I hope this helps.
Bye.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor