function euler
t0=0;
h=0.1;
tn=0.5;
t=t0:h:0.5;
n=length(t);
y0=1.4;
y(1)=y0;
for i=1:n-1
    dy=2*t(i)+(y(i)^2);
    y(i+1)=y(i)+h*dy;
end
[t' y']
figure(1)
plot(t,y)
xlabel('time(hr)'); 
ylabel('dynamic response');
grid on
grid minor

