1% [alpha, A] = DPH3From5Moments(moms, prec)
3% Returns an order-3 discrete phase-type distribution
4% which has the same 5 moments as given.
8% moms : vector of doubles, length(5)
10% prec : double, optional
11% Numerical precision,
default value
is 1e-14
15% alpha : matrix, shape (1,3)
16% The initial probability vector of the DPH(3)
17% A : matrix, shape (3,3)
18% Transition probability matrix of the DPH(3)
22% Raises an error
if the moments are not feasible with
25% This procedure first calls
'MGFromMoments', then transforms
26% it to DPH(3) by 'CanonicalFromDPH3'.
28function [alpha, A] = DPH3From5Moments (moms, prec)
30 if ~exist('prec','var')
34 [beta, B] = MGFromMoments(moms(1:5));
35 [alpha,A] = CanonicalFromDPH3(beta,B,prec);