Matlab 7.5 (2007b) Calling superclass function in overloaded subclass

1 回表示 (過去 30 日間)
Reza Housseini
Reza Housseini 2016 年 3 月 10 日
When I call
p = inputParser2;
addRequired(p, 'A');
in Matlab 7.5 (2007b), with
classdef inputParser2 < inputParser
methods
function addRequired(obj, argname, varargin)
addRequired@inputParser(obj, argname);
end
end
end
I get the error message
??? 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);
But addRequired is clearly a method of class inputParser?

回答 (0 件)

カテゴリ

Help Center および File ExchangeArgument Definitions についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by