LINE Solver
MATLAB API documentation
Loading...
Searching...
No Matches
map_acf.m
1function ACFCOEFFS=map_acf(MAP,LAGS)
2% ACFCOEFFS=map_acf(MAP,LAGS) - Compute autocorrelation coefficients of
3% interarrival times
4%
5% Input:
6% MAP: a MAP in the form of {D0,D1}
7% LAGS: a set of positive integers specificying the lags of the
8% autocorrelation coefficients (DEFAULT: 1)
9%
10% Output:
11% ACFCOEFFS: autocorrelation coefficients returned in the same order of
12% the LAGS vector
13%
14% Examples:
15% - map_acf(MAP) returns the lag-1 autocorrelation coefficient
16% - map_acf(MAP,1) returns the lag-1 autocorrelation coefficient
17% - map_acf(MAP,1:10) returns the first ten autocorrelation coefficients
18% - map_acf(MAP,logspace(0,4,5)) returns five logarithmically spaced
19% autocorrelation coefficients in [1e0,1e4]
20%
21
22
23if nargin==1
24 LAGS=1;
25end
26P=map_embedded(MAP);
27x=map_lambda(MAP)*map_prob(MAP);
28if issym(MAP{1}(1,1))
29 if ~isdeployed
30 ACFCOEFFS=sym([]);
31 y=inv(-MAP{1})*sym(ones(size(MAP{1},1),1));
32 end
33else
34 ACFCOEFFS=([]);
35 y=inv(-MAP{1})*ones(size(MAP{1},1),1);
36end
37for lag=LAGS
38 ACFCOEFFS(end+1)=x*(P^lag)*y;
39end
40ACFCOEFFS=(ACFCOEFFS-1)./map_scv(MAP);
41end