
close all
a = -1; b = 1; m = 17; u=16;%Equally Spaced, m=17
f='1./(1+u*x.^2)';
x = linspace(a,b,m); y1 = eval(f); 
x1 = x;      c = polyfit(x1,y1,m);
x = linspace(-1,1,100); y = eval(f);
pVal = polyval(c,x);

plot(x1,y1,'r*',x,pVal,'g--',x,y,'b')
axis([-1,1,-2,2])
