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!

Problem with Simulink - If block

Status
Not open for further replies.

PQF

Automotive
Joined
Jun 23, 2008
Messages
13
Location
DE
Hi everyone,

I'm a beginner with Simulink. I created a very simple model to get in touch with the If-Subsystem.
The model begins with a Constant C=1 passing through an Integrator (1/s). The function obtained through the integration logically is a Line. The line then passes through a if block with a restriction [ u > 2 ].I set two scopes. One showing me the output when u>2 the other one for every other situation. I expected results to be symmetric, but apperently they are not.
Whenever the restriction is not held the values remains at 1. Could anyone please explain me, what I could be doing wrongß ? I attached a picture with the model and outputs.
thank you in advance,
Paulo Faria
 
Can't say I understand the output of those If Action Subsystems either, but if you combine their outputs with a Merge block and scope the result of that, you get what you expect.
 
I was expecting two scopes to be inverse of each other. So as LiteYear suggested if you merge this two scopes you should get a constant ( in this case 1) output.

My guess is, you need to add something to refresh the else trigger, I could be totally off!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top