Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
2024.1.0 - Français


genmarkov

generates random markov matrix with recurrent and transient classes

Syntax

M=genmarkov(rec,tr)
M=genmarkov(rec,tr,flag)

Arguments

rec

integer row vector (its dimension is the number of recurrent classes).

tr

integer (number of transient states)

M

real Markov matrix. Sum of entries in each row should add to one.

flag

string 'perm'. If given, a random permutation of the states is done.

Description

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.

Examples

//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)

See also

  • classmarkov — recurrent and transient classes of Markov matrix
  • eigenmarkov — normalized left and right Markov eigenvectors
Report an issue
<< eigenmarkov Matrices de Markov Matrix Analysis >>

Copyright (c) 2022-2024 (Dassault Systèmes)
Copyright (c) 2017-2022 (ESI Group)
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Mon Jun 17 17:52:27 CEST 2024