Documentation

getInputNamesImpl

Names of MATLAB System block input ports

Syntax

[name1,name2,...] = getInputNamesImpl(obj)

Description

[name1,name2,...] = getInputNamesImpl(obj) specifies the names of the input ports of the System object™ on a MATLAB System block. The number of returned input names matches the number of inputs returned by the getNumInputs method. If you change a property value that changes the number of inputs, the names of those inputs also change.

getInputNamesImpl is called by the getInputNames method by the MATLAB System block.

Note

You must set Access = protected for this method.

Input Arguments

obj

System object

Output Arguments

name1,name2,...

Names of the inputs for the specified object, returned as character vectors

Default: empty character vector

Examples

expand all

Specify in your class definition file the names of two input ports as 'upper' and 'lower'.

methods (Access = protected)
   function varargout = getInputNamesImpl(obj)
      numInputs = getNumInputs(obj);
      varargout = cell(1,numInputs);
      varargout{1} = 'upper';
      if numInputs > 1
         varargout{2} = 'lower';
      end
   end
end
Was this topic helpful?