当我打电话
p = inputParser2;
addRequired(p, 'A');
在Matlab 7.5(2007b)中,
classdef inputParser2 < inputParser
methods
function addRequired(obj, argname, varargin)
addRequired@inputParser(obj, argname);
end
end
end
我收到错误消息
??? Error using ==> mcos_parent_function_
addRequired is not a method of base class inputParser.
Error in ==> inputParser2>inputParser2.addRequired at 5
addRequired@inputParser(obj, argname);
但addRequired
显然是类inputParser
的方法?