LINE Solver
MATLAB API documentation
Loading...
Searching...
No Matches
map_cdf.m
1function CDFVALS=map_cdf(MAP,POINTS)
2% CDFVALS=map_cdf(MAP,POINTS) - Compute cumulative distribution function of
3% interarrival times
4%
5% Input:
6% MAP: a MAP in the form of {D0,D1}
7% POINTS: a set of interarrival times
8%
9% Output:
10% CDFVALS: values of the cumulative distribution at the specified points
11% returned in the same order of the POINTS vector
12%
13% Examples:
14% - map_cdf(MAP,1) returns Pr[T<=1], being T an interarrival time
15% - map_cdf(MAP,[1,5]) returns [Pr[T<=1], Pr[T<=5]]
16
17CDFVALS=0*POINTS(:)';
18pie = map_pie(MAP);
19e1=ones(length(MAP{2}),1);
20if year(matlabRelease.Date)>2023 || strcmpi(matlabRelease.Release,"R2023b")
21 CDFVALS=1-sum(expmv(MAP{1}',pie',POINTS)' ,2)';
22else
23 for t=1:length(POINTS)
24 CDFVALS(t)=1-pie*expm(MAP{1}*POINTS(t))*e1;
25 end
26end
27end