% Plots several taylor polynomials for y=e^x at x=0 function plot_taylor; figure(1); clf; x=[-1:.1:1]; plot(x,exp(x),'r'); hold on; plot(x,1+0.*x,'b-'); plot(x,1+x,'b.-'); plot(x,1+x+x.*x/2,'b.-'); plot(x,1+x+x.*x/2+x.*x.*x/6,'b.-'); plot(x,1+x+x.*x/2+x.*x.*x/6+x.*x.*x.*x/24,'b.-'); grid on; hold off;