classmarkov — recurrent and transient classes of Markov matrix
[perm,rec,tr,indsRec,indsT]=classmarkov(M)
real N x N Markov matrix. Sum of entries in each row should add to one.
integer permutation vector.
integer vector, number (number of states in each recurrent classes, number of transient states).
integer vectors. (Indexes of recurrent and transient states).
Returns a permutation vector perm such that
M(perm,perm) = [M11 0 0 0 0 0]
[0 M22 0 0 0]
[0 0 M33 0]
[ ... ]
[0 0 Mrr 0]
[* * * Q]
Each Mii is a Markov matrix of dimension rec(i) i=1,..,r.
Q is sub-Markov matrix of dimension tr.
States 1 to sum(rec) are recurrent and states from r+1 to n
are transient.
One has perm=[indsRec,indsT] where indsRec is a vector of size sum(rec)
and indsT is a vector of size tr.