x=1:10;
y=cos(x);
n=length(x);
p=points(n);
for i=1:length(p)
    figure(i)
    [xi,yi]=interpL2(x,y,p(i));
    plot(x,y,'o',xi,yi)
    title(['Polynomial degree = ' num2str(p(i)) ])
end