1% [beta, B] = CanonicalFromPH3(alpha, A, prec)
3% Returns the canonical form of an order-3 phase-type
8% alpha : matrix, shape (1,3)
9% Initial vector of the phase-type distribution
10% A : matrix, shape (3,3)
11% Transient generator of the phase-type distribution
12% prec : double, optional
13% Numerical precision,
default value
is 1e-14
17% beta : matrix, shape (1,3)
18% The initial probability vector of the canonical form
19% B : matrix, shape (3,3)
20% Transient generator matrix of the canonical form
24% This procedure calculates 5 moments of the input and
25% calls
'PH3From5Moments'.
27function [beta, B] = CanonicalFromPH3 (alpha, A, prec)
29 if ~exist(
'prec',
'var')
33 global BuToolsCheckInput;
34 if isempty(BuToolsCheckInput)
35 BuToolsCheckInput = true;
38 if BuToolsCheckInput && ~CheckMERepresentation(alpha,A)
39 error('CanonicalFromPH3: Input isn''t a valid ME distribution!');
43 error('CanonicalFromPH3: Dimension
is not 3!');
46 [beta, B] = PH3From5Moments (MomentsFromME(alpha, A, 5), prec);