1% m = MomsFromHankelMoms(hm)
3% Returns the raw moments given the Hankel moments.
5% The raw moments are: `m_i=E(\mathcal{X}^i)`
7% The ith Hankel moment
is the determinant of matrix
8% `\Delta_{i/2}`,
if i
is even,
9% and it
is the determinant of `\Delta^{(1)}_{(i+1)/2}`,
10%
if i
is odd. For the definition of matrices `\Delta`
11% and `\Delta^{(1)}` see [1]_.
15% hm : vector of doubles
16% The list of Hankel moments (starting with the first
21% m : vector of doubles
22% The list of raw moments
28function m=MomsFromHankelMoms(hm)
34 H = hankel(m(1:N), [m(N:2*N-2),0]);
37 H = hankel([1,m(1:N-1)], [m(N-1:2*N-3),0]);
44 cofactor = (-1)^(N+j-1) * det(rHd);
46 h = h - cofactor * H(N,j+1);