next | previous | forward | backward | up | top | index | toc | Macaulay2 web site

fillMatrix -- fill a mutable matrix with random numbers

Synopsis

Description

i1 : printingPrecision = 2

o1 = 2
i2 : fillMatrix(mutableMatrix(RR,5,10))

o2 = | .71 .54 .21  .64  .67 .52 .66 .55 .8  .76 |
     | .47 .43 .67  .089 .46 .7  .95 .99 .31 .58 |
     | .79 .37 .083 .62  .1  .28 .88 .26 .66 .59 |
     | .16 .12 .83  .26  .95 .96 .8  .79 .53 .83 |
     | .53 .37 .35  .66  .44 .89 .28 .59 .91 .31 |

o2 : MutableMatrix
i3 : fillMatrix(mutableMatrix(ZZ,5,10),UpperTriangular=>true)

o3 = | . 6 7 4 8 1 6 7 7 1 |
     | . . 9 5 5 9 1 5 . . |
     | . . . 9 4 . . 7 5 7 |
     | . . . . 6 5 9 2 9 2 |
     | . . . . . . 4 8 . . |

o3 : MutableMatrix
i4 : fillMatrix(mutableMatrix(QQ,5,10),Density=>.2,Height=>1000)

o4 = | .       .       .       . . 78/17   . 377/178 878/675 173/42  |
     | 247/148 .       217/869 . . 233/145 . 784/933 124/5   .       |
     | 927/698 .       .       . . .       . .       .       .       |
     | 817/404 565/303 589/548 . . .       . .       .       260/283 |
     | .       .       13/110  . . .       . .       33/953  77/89   |

o4 : MutableMatrix
i5 : fillMatrix(mutableMatrix(ZZ,5,10),25,Height=>1000)

o5 = | .   266 863 .   .   839 .  531 .   .   |
     | 225 .   .   88  55  .   65 744 371 851 |
     | .   .   279 927 906 .   .  266 .   .   |
     | .   .   .   .   .   .   .  .   .   .   |
     | .   .   990 .   .   .   .  187 251 .   |

o5 : MutableMatrix

See also

Ways to use fillMatrix :