Suppose I have the following class:
classdef myClass < handle
properties
A = [10 20 30 40]
end
end
Then suppose I have the following calls:
>> m = myClass;
>> n = m;
n will be a handle to the same object as m is, of course. Is there a way to overload the assignment operator? In particular, I wonder if I can have something like the following method:
function val = assign(obj)
val = obj.A;
end
So doing n = m would act the same as n = m.A.