LINE Solver
MATLAB API documentation
Loading...
Searching...
No Matches
PmfFromDPH.m
1% pmf = PmfFromDPH(alpha, A, x, prec)
2%
3% Returns the probability mass function of a discrete
4% phase-type distribution.
5%
6% Parameters
7% ----------
8% alpha : vector, shape (1,M)
9% The initial probability vector of the discrete phase-
10% type distribution. The sum of the entries of pi0 is
11% less or equal to 1.
12% A : matrix, shape (M,M)
13% The transient generator matrix of the discrete phase-
14% type distribution.
15% x : vector of non-negative integers
16% The density function will be computed at these points
17% prec : double, optional
18% Numerical precision to check if the input DPH
19% distribution is valid. The default value is 1e-14.
20%
21% Returns
22% -------
23% pmf : column vector of doubles
24% The probabilities that the discrete phase type
25% distributed random variable takes the corresponding
26% "x" values
27%
28
29function pmf = PmfFromDPH (alpha, A, x)
30
31 global BuToolsCheckInput;
32 if isempty(BuToolsCheckInput)
33 BuToolsCheckInput = true;
34 end
35
36 if BuToolsCheckInput && ~CheckDPHRepresentation(alpha, A)
37 error('PmfFromDPH: Input isn''t a valid DPH distribution!');
38 end
39
40 pmf = PmfFromMG (alpha, A, x);
41end
42