I try the function to calculate the cummulative probability density function for exponetial distribution. But the result appear wrong. Can you check this
1=int(expopdf,0,infinity,): I use your function as follow: I=gausshermi('exppdf',0,10000,32)=2.2759. It should be one.
24 Mar 2006
Steven Spielman
function I=gausshermi(f,a,b,n)
neither 'a' nor 'b' is used in the function.
15 Jul 2008
Stephen Bocquet
Re. Nguyen Hieu's comment:
Gauss-Hermite quadrature is for integration from -Inf to Inf. Use Gauss-Laguerre quadrature to integrate from 0 to Inf.