1% acf = LagCorrelationsFromDRAP(H0, H1, L, prec)
3% Returns the lag autocorrelations of a discrete rational
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% The number of lags to compute. The
default value
is 1
14% prec : double, optional
15% Numerical precision to check
if the input
is valid.
16% The
default value
is 1e-14
20% acf : column vector of doubles, length (L)
21% The lag autocorrelation function up to lag L
24function acf = LagCorrelationsFromDRAP (H0, H1, L)
26 global BuToolsCheckInput;
27 if isempty(BuToolsCheckInput)
28 BuToolsCheckInput =
true;
31 if BuToolsCheckInput && ~CheckDRAPRepresentation(H0,H1)
32 error(
'LagCorrelationsFromDRAP: input isn''t a valid DRAP representation!');
39 H0i = inv(eye(size(H0))-H0);
42 moms = MomentsFromMG(pi, H0, 2);
48 acf(i) = (sum(pi*H0i) - moms(1)^2) / (moms(2) - moms(1)^2);