MATLAB Answers

Switches and if blocks wrong behavior?

3 views (last 30 days)
I made a system with a switch but also a if action block. The behavior of both systems should be the same. The switch doesn't work and the if action block doesn't reset. I am expecting the same output as the input.
See the system here. And the output here.
Lennart on 22 Nov 2011
Thanks for your response, I fixed the link.
The switch block now seems to work. But I can't make the if action system reset. I should go to zero again but it doesn't..

Sign in to comment.

Accepted Answer

Titus Edelhofer
Titus Edelhofer on 22 Nov 2011
Hi Lennart,
double click the output port in the if-action subsystem and do the following: (a) set the Initial Output to 0. (b) Set "Output when disabled" to "reset".
  1 Comment
Lennart on 22 Nov 2011
Thanks! Would not have looked there!

Sign in to comment.

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!