Previous Up Next

20.3.6  Generating random matrices

The randmatrix or ranm or randMat command produces random vectors and matrices. (See also Section 11.1.28 and Section 20.3.5.)

Examples

randmatrix(5)
     
⎡
⎣
−48,54,28,−51,63⎤
⎦
          
randmatrix(2,3)
     
⎡
⎢
⎣
40−74−87
40−1920
⎤
⎥
⎦
          
randmatrix(2,3,10)
     
⎡
⎢
⎣
421
440
⎤
⎥
⎦
          
randmatrix(2,3,0..1)
     
⎡
⎢
⎣
0.3843554719350.6554903262290.924850208685
0.1594298193230.9529571095480.220945354551
⎤
⎥
⎦
          
randmatrix(2,3,'randnorm(2,1)')
     
⎡
⎢
⎣
2.176705011950.6538825670482.94543112983
2.461506726792.192513208542.44211638655
⎤
⎥
⎦
          

Previous Up Next