% CHEBPOL  Chebyshev polynomials 
%
function y=chebpol(x,n)
Tkm1=1; Tk=x;
for k=2:n
  Tkm2=Tkm1; Tkm1=Tk;
  Tk=2*x.*Tkm1-Tkm2;
end
y=Tk;
