MATLAB Answers


Matlab/Simulink - manual switch

Asked by Robin Beene on 2 Apr 2013

Hey! I would like to know is it possible to manually turn on the switch in simulink but only let's say after some amount of time. For example my simulation takes 180 sec, and my switch is off in start, but I want to be able to turn it on after 10 sec. So if I try turn it on between 0<t<10 nothing should happen.

  1 Comment

10 seconds clock time, or 10 seconds of simulation time ?


No products are associated with this question.

1 Answer

Answer by Azzi Abdelmalek
on 2 Apr 2013
 Accepted answer

You should use this  



good, I tried it, but I managed only to bring some output variable to the control input, but I don't know how to bring "time" to the control input of this switch. My time is stored in variable tout. I need to bring tout to the control input, but I don't know how.

Use a clock block From Simulink/sources

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!