I am having issues calling superclass constructors from the command line when in debug mode. For example, let us say I have a class D which inherits classes A, B and C.
Suppose the constructor for D is as follows:
function obj = D obj = obj@A; obj = obj@B; obj = obj@C;end
If I put a breakpoint in the constructor for right after the line:
obj = obj@A;
And then try to run the following from the MATLAB Command Window:
K>> obj = obj@B;
I get the following error:
'obj' is not a method of base class 'B'.
However, running the entire script outside the MATLAB Debugger works fine. Why is this?
Best Answer