Previous Up Next

20.4.25  Generating a random walks

The randmarkov command generates random walks or creates stochastic matrices.

Examples

randmarkov([[0,1/2,0,1/2],[0,1,0,0],[1/4,1/4,1/4,1/4],[0,0,1/2,1/2]],2,10)
     

2,3,2,0,3,2,2,0,3,2,0
          
randmarkov([1,2],2)
     






1.00.00.00.00.0
0.00.2890319752090.7109680247910.00.0
0.00.462303832890.537696167110.00.0
0.2592622381370.1499488619460.1434481505240.2421327588020.205207990592
0.2315686337490.1454295863450.1556646737780.2825565118950.184780594232






          

Previous Up Next