aboutsummaryrefslogtreecommitdiffstats
path: root/math2373/lab6/eulerN.m
blob: 13a7cbcc6d181d810450d4de6166745b1fe01345 (plain) (blame)
1
2
3
4
5
h=2/N; t(1)=0; y(1)=1;
for n=1:N
    t(n+1)=t(n)+h;
    y(n+1)=y(n)+(-0.5*y(n)-t(n)+2)*h;
end