The following MATLAB code does not work. I guess it has something to do that in the function changer, MATLAB tries to equal the objects A
and B
and not just setting the values to the same. Any workaround for that?
classdef foo
%FOO Summary of this class goes here
% Detailed explanation goes here
properties
A=5
B=0
end
methods
function changer(obj)
obj.B=obj.A
end
end
end