title: MATLAB ODE45: only saving last solution
body: <p>I would like to only have ODE45 retain the last solution. Rather returning the all the solutions from the tspan = [t0 tf]; I only want the returned vector to be the solution at tf.</p>
  
  <p>The reason why I would like to do this is to avoid the following error:</p>
  
  <blockquote>
    <p>Error using horzcat Requested 442368x1828 (6.0GB) array exceeds
    maximum array size preference. Creation of arrays greater than this
    limit may take a long time and cause MATLAB to become unresponsive.
    See array size limit or preference panel for more information.</p>
    
    <p>Error in ode45 (line 428)
              yout = [yout, zeros(neq,chunk,dataType)];</p>
  </blockquote>