MATLAB: How to generate a “special” signal in Simulink

signal generationsimulink

I am trying to generate in Simulink a time varying input signal that has two different expressions depending on the time interval. For example,
signal(t) = sin(w*t), for a half time period and
signal(t) = 0, for the other half time period.
I would like to do this using exclusively Simulink and to run the simulation for several time periods (not just for one period).
Could anyone, please, give me a hint?

Best Answer

In this example, the period is 10.