1% x = SamplesFromDMAP(D0, D1, K, prec)
3% Generates random samples from a discrete Markovian
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.
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.
20% x : vector, length(K)
21% The vector of random samples (inter-arrival times).
23function x = SamplesFromDMAP(D0,D1,k,initial,prec)
25 if ~exist(
'initial',
'var')
29 global BuToolsCheckInput;
30 if isempty(BuToolsCheckInput)
31 BuToolsCheckInput = true;
34 if BuToolsCheckInput && ~CheckDMAPRepresentation(D0,D1)
35 error('SamplesFromDMAP: input isn''t a valid DMAP representation!');
38 x = SamplesFromDMMAP({D0,D1},k,initial);