1% moms = MarginalMomentsFromDMRAP(H, K, precision)
3% Returns the moments of the marginal distribution of a
4% discrete marked rational arrival process.
8% H : list/cell of matrices of shape(M,M), length(N)
9% The H0...HN matrices of the DMRAP
11% Number of moments to compute. If K=0, 2*M-1 moments
12% are computed. The
default value
is K=0.
13% precision : double, optional
14% Numerical precision
for checking
if the input
is valid.
15% The
default value
is 1e-14
19% moms : row vector of doubles, length K
20% The vector of moments.
22function moms = MarginalMomentsFromDMRAP (H,K)
24 if ~exist(
'K',
'var') || K==0
28 global BuToolsCheckInput;
29 if isempty(BuToolsCheckInput)
30 BuToolsCheckInput =
true;
33 if BuToolsCheckInput && ~CheckDMRAPRepresentation (H)
34 error(
'MarginalMomentsFromDMRAP: Input isn''t a valid DMRAP representation!');
37 [alpha,A] = MarginalDistributionFromDMRAP(H);
38 moms = MomentsFromMG(alpha,A,K);