Maxima 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]]
Let's 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.