1% moms = MarginalMomentsFromDRAP(H0, H1, K, precision)
3% Returns the moments of the marginal distribution of a
4% discrete rational arrival process.
8% H0 : matrix, shape (M,M)
9% The H0 matrix of the discrete rational arrival process
10% H1 : matrix, shape (M,M)
11% The H1 matrix of the discrete rational 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 = MarginalMomentsFromDRAP (H0, H1, K)
26 if ~exist(
'K',
'var') || K==0
30 global BuToolsCheckInput;
31 if isempty(BuToolsCheckInput)
32 BuToolsCheckInput =
true;
35 if BuToolsCheckInput && ~CheckDRAPRepresentation(H0,H1)
36 error(
'MarginalMomentsFromDRAP: Input isn''t a valid DRAP representation!');
39 [alpha,A] = MarginalDistributionFromDRAP(H0,H1);
40 moms = MomentsFromMG(alpha,A,K);