Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Using copy() for matrices still returns error

I want to take the zero matrix and assign entries to make a new matrix. I understand that the zero matrix is immutable and I need to make a copy, but copy() isn't working. Here is what I put in:

A = copy(matrix(3,3,0)) A[0][0]=1

and the error says vector is immutable; please change a copy instead (use copy())

What am I doing wrong?

Thank you!