The fast answer is that you want a copy of A, produced using copy(A). Somebody else will probably fill in more details of the why.
-- John On Jun 23, 2014, at 9:42 AM, JuliaLover <[email protected]> wrote: > Hi, > I have a problem that when I assign value of one array to another they stick > to each other whenever I change either array. For example, > > A = [1,2,4,6] > A0 = A > > then now I just want to change last value of A. > > A[4] =0 > > A change to [1,2,4,0] > > But now "A0" also automatically updates its values, A0 also now becomes > [1,2,4,0]. > > This result is not that I want. I just want to change A only, and still keep > A0 the same as before (i.e. A0=[1,2,4,6]). > > Do you know how to deal with the problem ? > > Many thanks for your help.
