% QUADCH  A special quadrature routine used in Example 2.46.
%
function xw=quadch(M,i)
global k2
n=M:-1:1;
xw(:,1)=cos((2*n'-1)*pi/(2*M));
xw(:,2)=pi./(M*sqrt(1-k2*xw(:,1).^2));
