function h = hermpoly(m, y)

if m == 0,
   h = ones(size(y));
elseif m == 1,
   h = 2 * y;
else
   h = 2 * y .* hermpoly(m-1, y) - 2 * (m - 1) * hermpoly(m-2, y);
end


