function explicit_stability h=1.9; t=0:h:100; [l,m]=size(t); x(1)=1; for i=2:m x(i)=x(i-1)-h*x(i-1); end M=max(abs(x)); if (M>1) M=10; Mi=-10; else Mi=-1; M=1; end y=exp(-t); figure(1) plot(t,y,'r',t,x,'b') title('explicit method') axis([0 100 Mi M])