next | previous | forward | backward | up | top | index | toc | Macaulay2 web site
Macaulay2Doc :: mutable matrices

mutable matrices

To and from matrices:
m = matrix{{1,2,3},{4,5,6}}
n = mutableMatrix m
m2 = matrix n
m2 - m == 0
Modifying and accessing entries. Remember that the upper left entry is (0,0), not (1,1)!
n_(0,0) = 212314323
n_(0,0)
n
Number of rows, columns, and the ring:
numrows n
numColumns n
numcols n
ring n

row and column operations

Some other methods for creating mutable matrices.

mutableIdentity(RR_100,5)
mutableMatrix(QQ,3,5)
randomMutableMatrix(4,4,.5,100)