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