Compute mean first passage times for an irreducible continuous-time Markov chain.
INPUTS
Q(i,j)Infinitesimal generator matrix. Q is a N \times N
square matrix where Q(i,j) is the transition rate from
state i to state j, for 1 ≤ i, j ≤ N,
i \neq j. Transition rates must be nonnegative, and
\sum_{j=1}^N Q_{i,j} = 0
iInitial state.
jDestination state.
OUTPUTS
M(i,j)average time before state
j is visited for the first time, starting from state i.
We let M(i,i) = 0.
mm is the average time before state j is visited for the first time, starting from state i.
See also: ctmcmtta.
The following code
Q = [ -1.0 0.9 0.1; ...
0.1 -1.0 0.9; ...
0.9 0.1 -1.0 ];
M = ctmcfpt(Q)
m = ctmcfpt(Q,1,3)
Produces the following output
M = 0.00000 1.20879 2.08791 2.08791 0.00000 1.20879 1.20879 2.08791 0.00000 m = 2.0879
Package: queueing