Hi,
I'm trying to extend the inputParser class, and hereby also extend the method parse() from that class.
Is it at all possible? The documentation seems to explain how to do this:
Here is my subclass with extended method:
classdef myInputParser < inputParser
properties
Extra
end
methods
function obj = myInputParser()
obj.Extra.test = 0;
end
function parse(obj, varargin)
parse@inputParser(obj, varargin{:});
obj.Extra = obj.Results;
end
end
end
I create the object, and parse the input like so:
p = myInputParser;
p.parse(varargin{:})
When calling the parse() method on the object, it doesn't seem to call the extended parse() in the subclass.
What am I missing? Any help would be greatly appreciated.