Sponsored links: Algebra eBooks
 

Help Index

A

B

C

D

E

F

G

H

I

J

K

L

M

N

O

P

Q

R

S

T

U

V

W

X

Y

Z

The Maxima on-line user's manual

Algebra Calculator

Search:

Copy Calculator

Copy

Function: copy (<e>) Return a copy of the Maxima expression <e>. Although <e> can be any Maxima expression, the copy function is the most useful when <e> is either a list or a matrix; consider:

          (%i1) m : [1,[2,3]]$
          (%i2) mm : m$
          (%i3) mm[2][1] : x$
          (%i4) m;
          (%o4)                      [1,[x,3]]
          (%i5) mm;
          (%o5)                      [1,[x,3]]
     Lets try the same experiment, but this time let <mm> be a copy of
     <m>
          (%i6) m : [1,[2,3]]$
          (%i7) mm : copy(m)$
          (%i8) mm[2][1] : x$
          (%i9) m;
          (%o9)                     [1,[2,3]]
          (%i10) mm;
          (%o10)                    [1,[x,3]]
     This time, the assignment to <mm> does not change the value of <m>.

a1 : matrix([3,-4, 5, 0], [2,-3, 1, 1], [3,-5,-1, 2], [3,-1, 4, 1]);
a : copy(a1);
n : length(a);
A : id : ident(n);
for k : 1 thru n do(u : col(id, k),v[1, k] : v[1, k]-1,w : A.u,gamma : 1 + v.w,A : A -1/gamma*w.v.A)

There are also some inexact matches for copy. Try ?? copy to see them.

(%o1)                                true
(%i2) 

Copy Example

Related Examples

copy

m : [1,[2,3]];

mm : m;

mm[2][1] : x;

Calculate

copy

a: "xxx";

b: copy(a);

Calculate

copy

m : [1,[2,3]];

mm : m;

mm[2][1] : x;

Calculate

copy

a: "xxx";

b: copy(a);

Calculate