Sponsored links: Algebra eBooks ### The Maxima on-line user's manual

Algebra Calculator

#### Search: #### Copymatrix

Function: copymatrix (<M>) Returns a copy of the matrix <M>. This is the only way to make a copy aside from copying <M> element by element.

Note that an assignment of one matrix to another, as in `m2: m1`, does not copy `m1`. An assignment `m2 [i,j]: x` or `setelmx (x, i, j, m2` also modifies `m1 [i,j]`. Creating a copy with `copymatrix` and then using assignment creates a separate, modified copy.

```(%o1)                                true
(%i2) ```

### Related Examples

S:3;

A:2;

xRef:20;

Calculate

S:3;

A:2;

xRef:20;

Calculate

? copymatrix;

Calculate

? copymatrix;

Calculate

? copymatrix;

Calculate

S:3;

A:2;

xRef:20;

Calculate

##### copymatrix-matrix-transpose

A: matrix( [0,0,1,1,1...

A^^2;

B:copymatrix(A^^2);

Calculate

S:3;

A:2;

xRef:20;

Calculate

S:3;

A:2;

xRef:20;

Calculate

##### copymatrix-genmatrix-matrix-sum

S:3;

A:2;

xRef:20;

Calculate 