clear all t(1)=0 y(1)=3 tfin=3 N=10 dt=(tfin-t(1))/N for i=1:N t(i+1)=t(i)+dt; y(i+1)=y(i)+t(i)*sin(y(i))*dt; end plot(t,y,'b-',t,y,'ro')