ctmcmtta
Compute the Mean-Time to Absorption (MTTA) of the CTMC described by the infinitesimal generator matrix Q, starting from initial occupancy probabilities p. If there are no absorbing states, this function fails with an error.
INPUTS
Q(i,j)
infinitesimal generator matrix. Q(i,j)
is the transition rate from state to state , . The matrix Q must satisfy the condition
p(i)
probability that the system is in state at time 0, for each
OUTPUTS
t
Mean time to absorption of the process represented by matrix Q. If there are no absorbing states, this function fails.
REFERENCES
See also: ctmcexps
mu = 0.01; death = [ 3 4 5 ] * mu; birth = 0*death; Q = ctmcbd(birth,death); t = ctmcmtta(Q,[0 0 0 1]) t = 78.333 |
N = 50; birth = death = ones(1,N-1); birth(1) = death(N-1) = 0; Q = diag(birth,1)+diag(death,-1); Q -= diag(sum(Q,2)); t = zeros(1,N/2); initial_state = 1:(N/2); for i=initial_state p = zeros(1,N); p(i) = 1; t(i) = ctmcmtta(Q,p); endfor plot(initial_state,t,"+"); title(sprintf("Birth-Death process, %d states, absorbing states=1,%d",N,N)); xlabel("Initial state"); ylabel("MTTA"); |