I've been looking for Matlab code to generate a sparse grid with positive weights.
I've found a variety of codes for this used in numerical integration found here and here.
For example the documentation on sparse-grids.de states for the Gauss-Hermite rule the weighting function is $w(x) = \exp\{-x'x/2\}/\sqrt{2\pi}>0$, and yet returns weights that oscillate in sign.
Can anyone with a better knowledge of quadrature rules explain to me why these programs are outputting negative weights? For my application (approximating a stochastic process by a Markov-chain), I need to generate a sparse grid with all positive weights.
Thanks