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 = | .17 .12 .06 .82 .89  .79 .36 .043 .98  .09 |
     | .95 .87 .81 .98 .68  .4  .11 .62  .094 .25 |
     | .29 .73 .34 .16 .59  .53 .22 .56  .34  .91 |
     | .09 .16 .99 .19 .5   .98 .98 .78  .18  .55 |
     | .89 .22 .8  .55 .014 .19 .94 .61  .25  .3  |

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

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

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

o4 = | .      .      23/413 .      .       .       . . 109/107 . |
     | .      .      .      .      .       286/293 . . 124/375 . |
     | .      .      .      23/568 .       .       . . .       . |
     | .      358/23 .      .      .       .       . . 474/367 . |
     | 129/40 .      77/69  .      295/186 .       . . .       . |

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

o5 = | .   . 952 .   .   .   627 .   .   .   |
     | .   . 849 358 .   995 72  761 51  .   |
     | 839 . .   .   .   562 563 .   405 167 |
     | 13  . .   642 308 .   .   930 .   .   |
     | 791 . .   .   472 .   .   .   930 .   |

o5 : MutableMatrix

See also

Ways to use fillMatrix :