%tic clear t = 160; L=0.5; x(1) = 0; x(2) = 1; options = odeset('RelTol',1e-7,'OutputFcn','odeplot','OutputSel',[1]); [t x] = ode45('oscillator1', [0:L:t], x, options); %toc