clf;clear,clc
dydt=@(t,y)[y(2);sin(t)-2*y(1)+.01*y(2)^2];
y0=[0 1];
tspan=[0 5];
[t,val]=ode45(dydt,tspan,y0);
plot(t,val)
legend('t-y','t-y''')
grid on
clf;clear,clc
dydt=@(t,y)[y(2);sin(t)-2*y(1)+.01*y(2)^2];
y0=[0 1];
tspan=[0 5];
[t,val]=ode45(dydt,tspan,y0);
plot(t,val)
legend('t-y','t-y''')
grid on