next | previous | forward | backward | up | top | index | toc | Macaulay2 web site
Macaulay2Doc :: matrix(MutableMatrix)

matrix(MutableMatrix) -- make a matrix from a mutable one

Synopsis

Description

There are many more operations available for matrices than for immutable matrices, but mutable matrices are sometimes easier to construct.
i1 : m = mutableMatrix(ZZ,3,5)

o1 = 0

o1 : MutableMatrix
i2 : m_(1,2) = 3

o2 = 3
i3 : m_(2,4) = 54

o3 = 54
i4 : m_(0,0) = -12

o4 = -12
i5 : m

o5 = | . . .                                             . .                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
     | . . 336502515300183334210534549892123252662206465 . .                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
     | . . .                                             . 820186819563929708822156309160998846429906827373507606756048782749110248917223377086118100123193527746460974055347712028522501362541613237682899737959391545564076232448927316940346845060301195209537504522927142000231891623666604646414740465394379461062792208430414835306556242171233319421571784438592162755556816175532321309022112315488399953165242535358337761877470248263996911021102623180987418546090835932287732510445211406862329058132732661166002408609772112052229391576539709316185162250996154370 |

o5 : MutableMatrix
i6 : matrix m

o6 = 0

              3        5
o6 : Matrix ZZ  <--- ZZ

See also