hold off x=0:.01:1; plot(x,exp(-x.*x),";exp(-x2);") % analytische Lösung hold on h=1/8; % Wahl der Schrittweite xh=0:h:1; u=1; % Anfangswert for i=1:length(xh)-1 u=[u u(length(u))*(-2*h*xh(length(u))+1)]; end plot(xh,u,";Polygonzug h=1/8;") % Ausgabe in polygon.ps gset term postscript gset output "polygon.ps" replot