clear
for m=1:4
    n=2*m;
    x = linspace(-5,5,n+1);
    y = 1./(1+x.^2);
    x0 = linspace(-5,5,1000);
    y0 = 1./(1+x0.^2);
    a = InterpNRecur(x,y);
    pVal = HornerN(a,x,x0);
    subplot(2,2,m)
      plot(x0,y0,x0,pVal,'--',x,y,'*')
      axis([-5 5 -1 1]) 
end
