% errdriver.m % % This is a driver which explorers issues related to % the error analysis for interpolating polynomials. % Set up the fine grid so that we can plot the % true function. x = [0:0.01:10]; % Plot the true function and its interpolant that % gets returned by the function Pint.m plot(x,f(x),'r-',x,Pint(0,10,x,3),'b-.'); xlabel('x'); ylabel('y'); title('f(x)=sin(x) and interpolating polynomial');