image thumbnail
from ODE Progress Bar and Interrupt by Tim Franklin
ODE integration progress bar, interrupt control and estimated time to completion

[]=main()
function []=main()


options=odeset('OutputFcn',@odeprog,'Events',@odeabort);
[T,S]=ode45(@odedyn,[0:0.001:10],zeros(4,1),options);



function [dS]=odedyn(t,S);
dS=magic(4)*S+rand(4,1);

Contact us at files@mathworks.com