1% [alpha, A] = MEFromMoments(moms)
3% Creates a matrix-exponential distribution that has the
4% same moments as given.
8% moms : vector of doubles, length(2*M-1)
9% The list of moments. The order of the resulting
10% matrix-exponential distribution
is
11% determined based on the number of moments given. To
12% obtain a matrix exponential distribution of order M,
13% 2*M-1 moments are required.
17% alpha : matrix, shape (1,M)
18% The initial vector of the matrix-exponential
20% A : matrix, shape (M,M)
21% The matrix parameter of the matrix-exponential
26% .. [1] A. van de Liefvoort. The moment problem
for
27% continuous distributions. Technical report,
28% University of Missouri, WP-CM-1990-02, Kansas City,
31function [alpha, A] = MEFromMoments (moms)
33 function K = appie (rmom)
63 beta(k) = ro / (rm(2).^(d(k)+n-1));
72 alpha(k,j) = ro / rm(2).^(j-1);
78 error (
'Insufficient matrix order!');
92 K(ind, ind-inc-d(i-1)+1) = beta(i-1);
94 K(ind, ind-j+1) = alpha(i,j);
101 K = appie (ReducedMomsFromMoms(moms));
102 N = ceil(length(moms)/2);
114 U(i,j) = 1 / (N-i+1);
120 alpha = alpha * inv(T) * U;
121 A = inv(-inv(U)*T*K*inv(T)*U);