% Script File: CSTest
% Tests CSInterp 

close all
x = linspace(0,2,100)'; 
y = ones(100,1)./(1 + 25*(cos(pi*x).^2));
for n=4:8:36
   figure
   xEqual = linspace(0,2,n+1)'; 
   yEqual = ones(n,1)./(1+25*(cos(pi*xEqual(1:n)).^2));
   FC=CSInterp(yEqual);
   Fvals = CSEval(FC,2,x);
   plot(x,y,x,Fvals,xEqual(1:n),yEqual,'*')
   title(sprintf('Trig Interpolant (n = %2.0f)',n))
end


