%  cut and paste these oneliners to the command line

xp=-1:.5:1; p=polyfit(xp,sin(xp),4)

x=-2:.01:2; plot(x,sin(x),x,polyval(p,x),'--')

legend('sin(x)','interpolating polynomial')

hold on, plot(xp,sin(xp),'.','markersize',14), hold off

