You have matrix
nested inside mtimes
:
function obj = mtimes(obj1, obj2)
temp1 = [obj1.a, 0; 0 obj1.b];
temp2 = [obj2.a, 0; 0 obj2.b];
temp3 = temp1*temp2;
obj.a = temp3(1,1);
obj.b = temp3(2,2);
function r = matrix(obj)
r = [obj.a, 0; 0 obj.b];
end
end
EDIT: Did you just fix it? Your post no longer looks like the above.