%
% s01sinetable.m - Y=sin(X),      0<=0 X <=2*pi
%
X=linspace(0,2*pi);
Y=sin(X);
Z= X - X.^3/6 + X.^5/120 - X.^7/5040 + X.^9/382880 - X.^11/42116800 ...
   + X.^13/42116800/12/13;
axis([0 2*pi, -1 1])
plot(X,Y,'r-',X,Z,'b--',[0, pi/2, pi, 1.5*pi, 2*pi], [0,1,0,-1,0],'d');
legend('Y=sin(X)','Z=Taylor Approximation');
title('Taylor Polynomial Approximation of Degree 13 for Y=sin(X)')