Keep initial input signal of enabled subsystem constant during pulse
<p>Imagine I have a continous signal (e.g. a sine) and a periodic rectangular pulse (50%) (<strong>blue lines</strong>):</p>

<p><a href="https://i.stack.imgur.com/G8Ajn.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/G8Ajn.png" alt="enter image description here"></a></p>

<p>While the pulse is switching its state - and a little before and after (<strong>yellow line, 2nd plot</strong>) - I'd like the continious signal to remain constant. So when the second pulse = 1, there should be a little stair step in the original signal. </p>

<p><strong>How can I implement this behaviour in Simulink?</strong></p>

<hr>

<p>I thought a simple <strong>Zero Order Hold</strong> within an enabled subsystem should be enough, but it returns the output from the <em>previous enabled state</em>, which is a little weird (<strong>yellow line, 1st plot</strong>).</p>

<p><a href="https://www.dropbox.com/s/3u428w0dwks3uoc/test.slx?dl=0" rel="nofollow noreferrer"><strong>Here you can find a minimal example to play with.</strong></a>:</p>

<p><a href="https://i.stack.imgur.com/ja9WR.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ja9WR.png" alt="enter image description here"></a></p>