hold off; n=20; h=10/n; % Cubic spline with n (equally spaced) nodes x=-5:h:5; y=1./(1+x.*x); xi=-5:.01:5; yi=spline(x,y,xi); plot(xi,yi,'k') hold on; % Plot the original function yi=1./(1+xi.*xi); plot(xi,yi,'b');