Please note that the recommended version of Scilab is 6.0.0. This page might be outdated.
See the recommended documentation of this function
generates random markov matrix with recurrent and transient classes
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.
'perm'. If given, a random permutation of the states is done.
Returns in M a random Markov transition probability matrix
size(rec,1) recurrent classes with
entries respectively and tr transient states.
//P has two recurrent classes (with 2 and 1 states) 2 transient states P=genmarkov([2,1],2,'perm') [perm,rec,tr,indsRec,indsT]=classmarkov(P); P(perm,perm)