1% [beta, B] = MonocyclicPHFromME(alpha, A, maxSize, precision)
3% Transforms an arbitrary matrix-exponential representation
4% to a Markovian monocyclic representation.
8% alpha : matrix, shape (1,N)
9% Initial vector of the distribution
10% A : matrix, shape (N,N)
11% Matrix parameter of the distribution
12% maxSize : int, optional
13% The maximum number of phases
for the result. The
default
15% precision : double, optional
16% Vector and matrix entries smaller than the precision
17% are considered to be zeros. The
default value
is 1e-14.
21% beta : matrix, shape (1,M)
22% The initial probability vector of the Markovian
23% monocyclic representation
24% B : matrix, shape (M,M)
25% Transient generator matrix of the Markovian
26% monocyclic representation
30% Raises an error
if no Markovian monocyclic representation
35% .. [1] Mocanu, S., Commault, C.:
"Sparse representations of
36% phase-type distributions," Stoch. Models 15, 759-778
39function [beta, B] = MonocyclicPHFromME (alpha, A, maxSize, precision)
41 if ~exist(
'precision',
'var')
45 if ~exist(
'maxSize',
'var')
49 G = TransformToMonocyclic (A, maxSize, precision);
51 % find transformation matrix
52 T = SimilarityMatrix (A, G);
53 gamma = real(alpha*T);
55 if min(gamma) > -precision
59 [beta, B] = ExtendToMarkovian (gamma, G, maxSize, precision);
62 if ~CheckPHRepresentation(beta, B, precision)
63 error('MonocyclicPHFromME: No monocyclic representation found up to the given size and precision!');