% QHERM A quadrature routine used in Example 3.60.
%
function xw=qherm(N,i)
global m
load -ascii abhrhermite;
abh=abhrhermite(1:N,:); abh(1,2)=.5*sqrt(pi)*abh(1,2);
xw=gauss(N,abh);
x2=xw(:,1).^2; x4=x2.^2;
if m==1
  xw(:,2)=x2.*(4*x2-2).*xw(:,2);
elseif m==2
  xw(:,2)=x4.*(4*x2-6).*xw(:,2);
else
  xw(:,2)=(2*x4/3).*(4*x4-12*x2+3).*xw(:,2);
end 
