File: classmarkov.cat

package info (click to toggle)
scilab 2.6-4
  • links: PTS
  • area: non-free
  • in suites: woody
  • size: 54,632 kB
  • ctags: 40,267
  • sloc: ansic: 267,851; fortran: 166,549; sh: 10,005; makefile: 4,119; tcl: 1,070; cpp: 233; csh: 143; asm: 135; perl: 130; java: 39
file content (40 lines) | stat: -rw-r--r-- 1,400 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
classmarkov        Scilab Group        Scilab Function          classmarkov
NAME
   classmarkov - recurrent and transient classes of Markov matrix
  
CALLING SEQUENCE
 [perm,rec,tr,indsRec,indsT]=classmarkov(M)
PARAMETERS
 M          : real N x N Markov matrix. Sum of entries in each row should
            add to one.
            
 perm       : integer permutation vector.
            
 rec, tr    : integer vector, number (number of states in each recurrent
            classes, number of transient states).
            
 indsRec,indsT
             : integer vectors. (Indexes of recurrent and transient states).
            
DESCRIPTION
   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.
  
EXAMPLE
 //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
   genmarkov, eigenmarkov