LINE Solver
MATLAB API documentation
Loading...
Searching...
No Matches
FluidStationaryDistr.m
1% pi = FluidStationaryDistr (mass0, ini, K, clo, x)
2%
3% Returns the stationary distribution of a Markovian
4% fluid model at the given points.
5%
6% Parameters
7% ----------
8% mass0 : matrix, shape (1,Np+Nm)
9% The stationary probability vector of zero level
10% ini : matrix, shape (1,Np)
11% The initial vector of the stationary density
12% K : matrix, shape (Np,Np)
13% The matrix parameter of the stationary density
14% clo : matrix, shape (Np,Np+Nm)
15% The closing matrix of the stationary density
16% x : vector, length (K)
17% The distribution function is computed at these
18% points.
19%
20% Returns
21% -------
22% pi : matrix, shape (K,Nm+Np)
23% The ith row of pi is the probability that the fluid
24% level is less than or equal to x(i), while being in
25% different states of the background process.
26
27function y = FluidStationaryDistr (mass0, ini, K, clo, x)
28
29 m = size(clo,2);
30 y = zeros(length(x),m);
31 closing = inv(-K)*clo;
32 for i=1:length(x)
33 y(i,:) = mass0 + ini*(eye(size(K))-expm(K*x(i)))*closing;
34 end
35end
36