title: Running simulink model step-by-step
body: <p>I am trying to link an external app to a Simulink model and run the simulation step-by-step.  In the model command description it says 'other MATLAB program-based tools to run a simulation step-by-step', what it does not say is how you do this.  </p>
  
  <p>The process looks to be:</p>
  
  <ol>
  <li>compile model</li>
  </ol>
  
  <p>then for each time step:</p>
  
  <ol>
  <li>call outputs = model(t,x,u,'outputs');</li>
  <li>call dstates = model(t,x,u,'update');</li>
  <li>call derivs = model(t,x,u,'derivs');</li>
  </ol>
  
  <p>What appears to be missing is the call to calculate the continuous states; does any one know how to do this?</p>