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 = | . . .                                             . .                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
     | . . 338704817867893231577095706380455497139486721 . .                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
     | . . .                                             . 386301431134502427122801344629774236456495554532748723637180678932042787955182537323154180625915735143388235490432544378103925367657231375021267001795401591496446839192053086000305528527833929795700030529869834013338073956882108074556693591058841471480506573079497210495823805310495930371557513704142465810028649031215997280694549071472219293434699799147084371191679011206091821469176502389584138505855076083877803111812553202869071875005509510067024339002820625258057894760324366020891981552413833636610050 |

o5 : MutableMatrix
i6 : matrix m

o6 = 0

              3        5
o6 : Matrix ZZ  <--- ZZ

See also