For example, I want to do a deep copy of a
to b
:
>> a=zeros(2,3);
>> b=a;
So here =
creates only a shallow copy. My question is, how to generate a deep copy in this case? I know that I can add a command like
b(1,1)=b(1,1)
to make it a deep copy. But is there a better way to do that?