% Draw Figure 3.4 p. 61.
% Interpolate the points <-3,1>, <-1,0>, <0,5>, <2,0>, and <4,1>
% with a polynomial and with a sum of sinusoids.

fplot('(13 * x^4 - 26 *x^3 - 163 * x^2 + 176 * x +300)/60',[-4,5],'-r')
hold on
fplot('0.0217 +1.6547*sin(pi*x/2) + 0.9566*sin(pi*x/4) + 2.3116*cos(pi*x/2) + 2.6667*cos(pi*x/6)',[-4,5],'--g')
x=[-3,-1,0,2,4]
y=[1,0,5,0,1]
plot(x,y,'*b')
