Synopsis:
matrix(R,v) -- create a matrix over R from a doubly-nested list of ring elements or matrices.
This is essentially the same as matrix {...} together with the specification of the ring.
i1 : R = ZZ/101[a..f] |
i2 : matrix(R, {{a,b,0},{d,0,f}}) |
See also:
Code:
-- ../../../Macaulay2/m2/matrix1.m2:7-10 matrix(Ring,List) := Matrix => options -> (R,m) -> ( m = apply(splice m,splice); if not isTable m then error "expected a table"; map(R^#m,,m,options))