MATLAB Answers


Can I use an enabled subsystem to reset a signal generator?

Asked by Fernando
on 27 Aug 2014
Latest activity Commented on by Fernando
on 28 Aug 2014

I have a signal generator (ramp) inside an enabled subsystem. I had hoped that I would be able to reset the signal generator when I disabled the subsystem. Unfortunately, this does not appear to work. I would like to be able to use the signal builder to build a signal and then use an enabled subsystem or some other technique to reset this signal when I trigger a particular event.


1 Answer

Answer by Yu Jiang
on 28 Aug 2014

Hi Fernando

The attached model might be a workaround. Notice that in the subsystem, I double-clicked the enable block and change the "States when enabling:" to "reset". If you would also like to reset the output, you can double-click the out block in the subsystem and change "output when disabled" to "reset".

- Yu

  1 Comment

Thank you for the response and I agree that this work around might be appropriate for the ramp signal. However, I am looking for a way to reset an arbitrary signal to it's initial condition when the subsystem switches between states.

Join the 15-year community celebration.

Play games and win prizes!

Learn more
Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

MATLAB Academy

New to MATLAB?

Learn MATLAB today!