1
<?xml version="1.0" encoding="UTF-8"?>
3
* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
4
* Copyright (C) 2008 - INRIA
6
* This file must be used under the terms of the CeCILL.
7
* This source file is licensed as described in the file COPYING, which
8
* you should have received as part of this distribution. The terms
9
* are also available at
10
* http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
13
<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" version="5.0-subset Scilab" xml:lang="en" xml:id="genmarkov">
15
<refname>genmarkov</refname>
16
<refpurpose> generates random markov matrix with recurrent and transient classes</refpurpose>
19
<title>Calling Sequence</title>
20
<synopsis>M=genmarkov(rec,tr)
21
M=genmarkov(rec,tr,flag)
25
<title>Arguments</title>
30
<para>integer row vector (its dimension is the number of recurrent classes).</para>
36
<para>integer (number of transient states)</para>
42
<para>real Markov matrix. Sum of entries in each row should add to one.</para>
49
string <literal>'perm'</literal>. If given, a random permutation of the states is done.
56
<title>Description</title>
58
Returns in M a random Markov transition probability matrix
59
with <literal>size(rec,1)</literal> recurrent classes with <literal>rec(1),...rec($)</literal>
60
entries respectively and tr transient states.
64
<title>Examples</title>
65
<programlisting role="example"><![CDATA[
66
//P has two recurrent classes (with 2 and 1 states) 2 transient states
67
P=genmarkov([2,1],2,'perm')
68
[perm,rec,tr,indsRec,indsT]=classmarkov(P);
72
<refsection role="see also">
73
<title>See Also</title>
74
<simplelist type="inline">
76
<link linkend="classmarkov">classmarkov</link>
79
<link linkend="eigenmarkov">eigenmarkov</link>