FSbis = FS gives you a new name for the array, but it's still the array On Wednesday, May 28, 2014, paul analyst <[email protected]> wrote:
> Code running back? what happens? > I have a array FS > > > julia> println(sum(FS)); > 9.8267205e7 > > julia> l,m=size(FS); > > julia> FSbis=FS; > > julia> > > julia> > > julia> for i=1:l; #println(i) > if w[i]==1 us=hcat(F[i,:]',[1:1:m]); > us=sortrows(us, by=x->x[1],rev=true); > for j=1:m > if in(us[j,2],Su) FSbis[i,us[j,2]]=us[j,2]; break end; > end; > end; > end; > > julia> > > julia> println(sum(FSbis)); > 1.03295914e8 > > julia> > > julia> println(sum(FS)); > 1.03295914e8 > > > after the code array FSbis changing and well. But the array FS too is > changing! Why? Compare sum(FS) before and after. > Paul >
