LINE Solver
MATLAB API documentation
Loading...
Searching...
No Matches
SamplesFromMAP.m
1% x = SamplesFromMAP(D0, D1, K, prec)
2%
3% Generates random samples from a Markovian arrival
4% process.
5%
6% Parameters
7% ----------
8% D0 : matrix, shape (M,M)
9% The D0 matrix of the Markovian arrival process
10% D1 : matrix, shape (M,M)
11% The D1 matrix of the Markovian arrival process
12% K : integer
13% The number of samples to generate.
14% prec : double, optional
15% Numerical precision to check if the input Markovian
16% arrival process is valid. The default value is
17% 1e-14.
18%
19% Returns
20% -------
21% x : vector, length(K)
22% The vector of random samples (inter-arrival times).
23
24function x = SamplesFromMAP(D0,D1,k,initial)
25
26 if ~exist('initial','var')
27 initial=[];
28 end
29
30 global BuToolsCheckInput;
31
32 if isempty(BuToolsCheckInput)
33 BuToolsCheckInput = true;
34 end
35
36 if BuToolsCheckInput && ~CheckMAPRepresentation(D0,D1)
37 error('SamplesFromMAP: input isn''t a valid MAP representation!');
38 end
39
40 x = SamplesFromMMAP({D0,D1},k,initial);
41end