I'm also wondering how MATLAB behaves with class inheritance and file modifications. Let's say you have the following classes (in separate files):
classdef ClassA < handle
methods
function out = m1 (obj)
out = 1;
end
end
end
classdef ClassB < ClassA
methods
function out = m1 (obj)
out = 0;
end
end
end
Then at MATLAB prompt, you type: ?ClassB
Then you modify ClassA and tag m1 as Sealed, that is:
classdef ClassA < handle
methods (Sealed)
function out = m1 (obj)
out = 1;
end
end
end
I forgot to mention here: after the modifications, you try again "?ClassB". If MATLAB does not complain, try to create an object of ClassB. If it still does not complain, try to call method m1 on created object.
You can also exit MATLAB and restart it. Leave the modification in ClassA and do the same tests as above.
Michael.