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

fillMatrix -- fill a mutable matrix with random numbers

Synopsis

Description

i1 : printingPrecision = 2

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

o2 = | .079 .84 .53 .45 .62  .5  .038 .48   .26 .69 |
     | .4   .29 .85 .2  .37  .8  .8   .53   .45 .96 |
     | .73  .77 .18 .99 .14  .49 .39  .54   .34 .59 |
     | .54  .63 .25 .2  .38  .73 .44  .44   .45 .73 |
     | .13  .14 .13 .56 .097 .73 .7   .0071 .31 .68 |

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

o3 = | . . . . . . . . . . |
     | . . . . . . . . . . |
     | . . . . . . . . . . |
     | . . . . . . . . . . |
     | . . . . . . . . . . |

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

o4 = | .       .       710/147 . .       401/405 .       .       . 149/44  |
     | .       .       .       . .       .       .       .       . 191/281 |
     | .       .       73/50   . 327/179 .       .       .       . .       |
     | 3       208/331 3/901   . .       .       .       711/346 . 591/758 |
     | 593/356 .       295/424 . .       .       726/421 .       . .       |

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

o5 = | . . . . . . . . . . |
     | . . . . . . . . . . |
     | . . . . . . . . . . |
     | . . . . . . . . . . |
     | . . . . . . . . . . |

o5 : MutableMatrix

See also

Ways to use fillMatrix :