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 . .                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
     | . . .                                             . 51305664362631823431131452332684219095441366393503316562406775367456619842774149033436546722048380400299097094186678164620958231764586996995008904659749469895254881103150874668743163704759940249568952243786736952344746891883405128232923330400375041016085213152000551852531126446372445162715249178473585798779799928309346024845080670293573142953616853871671744590218626983977130148788524313810615502362071107912781381831945420728967698019316106516968662269089511774471158558927306632321683283907516294047465474 |

o5 : MutableMatrix
i6 : matrix m

o6 = 0

              3        5
o6 : Matrix ZZ  <--- ZZ

See also