Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • 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
Joined
Jul 10, 2003
Messages
1
Location
GB
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...
 
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

Back
Top