classdef inputDef properties nMatch end methods function obj = inputDef(varargin) p = inputParser; p.addParameter('nMatch', 1, @isnumeric); p.parse(varargin{:}); obj.nMatch = p.Results.nMatch; % Position of the sorting parameters
end endend
I have a superclass inputDef which has propety nMatch. I create an object and assign a value as below
>>in = inputDef>>in.nMatch = 2
How do I inherit inputDef in a another class such that I can get
>> out = outDef(in)>> out.nMatch = 2classdef outDef < inputDef properties ... endmethods function obj = outDef(obj1) obj = obj1 endendend
Please give some idea. Thanks in advance
Best Answer