title: Is there a way to plot a animation of a closed loop system on matlab?
body: <p>Is there any option on matlab to make a animation of a closed loop system instead a picture? </p>
  
  <p>I tried to use the for loop to vary the simulation time of the step response, for each for loop interaction I tried to use the step () function to simulate one in a second but the simulation function only showed the result the first interaction, plotting the result image instead has to plot several images over time to give the impression of animation.</p>
  
  <p>I expect to see the evolution over time of the step response or the ramp response of a system.</p>
  
  <p><a href="https://i.stack.imgur.com/qXZ2s.png" rel="nofollow noreferrer">Code that i tried to make the animation of a closed-loop transfer function</a></p>
  
  <p><a href="https://i.stack.imgur.com/IqCeN.png" rel="nofollow noreferrer">Error message using getframe and movie in Matlab</a></p>
  
  <p><a href="https://i.stack.imgur.com/OWXFd.png" rel="nofollow noreferrer">Animation of a closed loop transfer function on Matlab</a></p>