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 = | . . .                                             . .                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
     | . . 336038370151054137038902537746532995761700865 . .                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
     | . . .                                             . 820186819563929344586040444001256020304457874681745744276688670509446980982716005383857056798970625055085408021242300429174387262932637697223278236612230481530555037989439837488995453240924825303750390565375879233080501877450860057002194307625403426893612168293036899047651437200815663941393975092126408813012370859073327372656735487987830813396932291471728540902200755177967042967475508624305990950347404430488645623112541779892699456653064623708921810757646825714889594412114780748441260572115206146 |

o5 : MutableMatrix
i6 : matrix m

o6 = 0

              3        5
o6 : Matrix ZZ  <--- ZZ

See also