Macaulay2 » Documentation
Packages » Macaulay2Doc » matrices » mutable matrices » mutableMatrix
next | previous | forward | backward | up | index | toc

mutableMatrix -- make a mutable matrix

Description

i1 : f = mutableMatrix {{1,2,3,4}}

o1 = | 1 2 3 4 |

o1 : MutableMatrix
i2 : f_(0,2)

o2 = 3
i3 : f_(0,2) = 33

o3 = 33
i4 : f

o4 = | 1 2 33 4 |

o4 : MutableMatrix
i5 : R = QQ[a..z]

o5 = R

o5 : PolynomialRing
i6 : mutableMatrix genericMatrix(R,3,3)

o6 = | a d g |
     | b e h |
     | c f i |

o6 : MutableMatrix

Ways to use mutableMatrix:

  • mutableMatrix(List)
  • mutableMatrix(Matrix)
  • mutableMatrix(MutableMatrix)
  • mutableMatrix(Ring,List)
  • mutableMatrix(RingFamily,List)
  • mutableMatrix(Ring,ZZ,ZZ) -- make a mutable matrix filled with zeroes
  • mutableMatrix(RingFamily,ZZ,ZZ) -- see mutableMatrix(Ring,ZZ,ZZ) -- make a mutable matrix filled with zeroes

For the programmer

The object mutableMatrix is a method function with options.


The source of this document is in Macaulay2Doc/doc3.m2:32:0.