1% moms = MarginalMomentsFromDMAP(D0, D1, K, precision)
3% Returns the moments of the marginal distribution of a
4% discrete Markovian arrival process.
8% D0 : matrix, shape (M,M)
9% The D0 matrix of the discrete Markovian arrival process
10% D1 : matrix, shape (M,M)
11% The D1 matrix of the discrete Markovian arrival process
13% Number of moments to compute. If K=0, 2*M-1 moments
14% are computed. The
default value
is K=0.
15% precision : double, optional
16% Numerical precision
for checking
if the input
is valid.
17% The
default value
is 1e-14
21% moms : row vector of doubles, length K
22% The vector of moments.
24function moms = MarginalMomentsFromDMAP (D0, D1, K)
26 if ~exist(
'K',
'var') || K==0
30 global BuToolsCheckInput;
31 if isempty(BuToolsCheckInput)
32 BuToolsCheckInput =
true;
35 if BuToolsCheckInput && ~CheckDMAPRepresentation(D0,D1)
36 error(
'MarginalMomentsFromDMAP: input isn''t a valid DMAP representation!');
39 [alpha,A] = MarginalDistributionFromDMAP(D0,D1);
40 moms = MomentsFromDPH(alpha,A,K);