genmarkov — generates random markov matrix with recurrent and transient classes
M=genmarkov(rec,tr) M=genmarkov(rec,tr,flag)
integer row vector (its dimension is the number of recurrent classes).
integer (number of transient states)
real Markov matrix. Sum of entries in each row should add to one.
string 'perm'
. If given, a random permutation of the states is done.
Returns in M a random Markov transition probability matrix
with size(rec,1)
recurrent classes with rec(1),...rec($)
entries respectively and tr transient states.