title: How to display Matlab's ode45 results in real time?
body: <p>Let's suppose that we have the following solver for a system of first-order ODEs:</p>
  
  <pre><code>   % func.m
     function dydt = func(t,y)
     dydt = [y(2); (1-y(1)^2)*y(2)-y(1)];
  </code></pre>
  
  <p>and the main code:</p>
  
  <pre><code>% solver.m
  tspan=0:1:10;
  [t,y] = ode45(@func,tspan,[2; 0]);
  </code></pre>
  
  <p>How to display  in real-time the results, y1(t) and y2(t), for each time step t that the ode45 makes (t=0,1,2,...,10), without waiting for the whole code to finish?</p>