1% B = TransformToAcyclic(A, maxSize, precision)
3% Transforms an arbitrary matrix to a Markovian bi-diagonal
8% A : matrix, shape (N,N)
9% Matrix parameter of the initial representation
10% maxSize : int, optional
11% The maximal order of the resulting Markovian
12% representation. The
default value
is 100
13% precision : double, optional
14% Matrix entries smaller than the precision are
15% considered to be zeros. The
default value
is 1e-14
19% B : matrix, shape (N,N)
20% Transient (bi-diagonal) generator matrix of the
21% Markovian acyclic representation.
25% Calls the
'TransformToMonocyclic' procedure
if all the
26% eigenvalues are real, otherwise it raises an error
if no
27% Markovian acyclic generator has been found up to the
30% Raises an error
if no Markovian acyclic generator
31% has been found up to the given size.
34% .. [1] Mocanu, S., Commault, C.:
"Sparse representations
35% of phase-type distributions," Stoch. Models 15,
38function B = TransformToAcyclic (A, maxSize, precision)
40 if ~exist(
'precision',
'var')
44 if ~exist(
'maxSize',
'var')
48 if any(imag(eig(A))>=precision)
49 error 'TransformToAcyclic: Complex eigenvalue found, no acyclic representation exists.';
52 B = TransformToMonocyclic (A, maxSize, precision);