1% pdf = PdfFromME(alpha, A, x, prec)
3% Returns the probability density function of a matrix-
4% exponential distribution.
8% alpha : vector, shape (1,M)
9% The initial vector of the matrix-exponential
11% A : matrix, shape (M,M)
12% The matrix parameter of the matrix-exponential
14% x : vector of doubles
15% The density function will be computed at these points
16% prec : double, optional
17% Numerical precision to check
if the input ME
18% distribution
is valid. The
default value
is 1e-14.
22% pdf : column vector of doubles
23% The values of the density function at the
24% corresponding
"x" values
26function pdf = PdfFromME (alpha, A, x)
28 global BuToolsCheckInput;
29 if isempty(BuToolsCheckInput)
30 BuToolsCheckInput =
true;
33 if BuToolsCheckInput && ~CheckMERepresentation(alpha, A)
34 error(
'PdfFromME: Input isn''t a valid ME distribution!');
37 pdf = zeros(1,length(x));
39 pdf(i) = sum(alpha*expm(A*x(i))*(-A));