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 = | . . .                                             . .                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
     | . . 337184441168036154643742052600241620225359873 . .                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
     | . . .                                             . 51305664362631823431131452332684176692776726830853952074936086054174305714628442725224915501971730015698391213876391657221803402768484200484769169009320941007452322887075629397998170864174117607638297126355118518673083278481001262484745539678646463015448096321009138082775010630147401267907119632450871155418554179324616374557854096256946622356605285882979111079746567655939342093584280181474252994071988816294689617188048923817264588602988727907577872837859426199073989668836842280598292885495803165108338690 |

o5 : MutableMatrix
i6 : matrix m

o6 = 0

              3        5
o6 : Matrix ZZ  <--- ZZ

See also