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 = | .61 .59 .76  .68 .96   .19 .11 .89 .76 .67 |
     | .44 .24 .43  .65 .25   .33 .98 .46 .8  .53 |
     | .29 .65 .48  .51 .88   .58 .86 .23 .68 .56 |
     | .2  .89 .73  .71 .2    .86 .69 .72 .96 .27 |
     | .75 .7  .022 .19 .0073 .3  .61 .56 .19 .63 |

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

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

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

o4 = | .       . .       .       .      .    . . .       .      |
     | .       . 589/696 .       .      .    . . .       109/52 |
     | 652/665 . .       .       .      .    . . .       .      |
     | 229/182 . .       .       .      6/23 . . 861/857 .      |
     | .       . .       568/977 46/279 .    . . .       97/789 |

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

o5 = | 876 881 .   .  .   . 585 81  .   498 |
     | 592 .   637 74 .   . .   .   .   128 |
     | .   .   .   .  731 . .   .   928 .   |
     | 6   .   10  .  .   . 105 317 .   30  |
     | .   .   870 .  673 . 488 .   35  .   |

o5 : MutableMatrix

See also

Ways to use fillMatrix :