Documentation Center

  • Trial Software
  • Product Updates

validateInputsImpl

Class: matlab.System
Package: matlab

Validate inputs to step method

Syntax

validateInputsImpl(obj,input1,input2,...)

Description

validateInputsImpl(obj,input1,input2,...) validates inputs to the step method at the beginning of initialization. Validation includes checking data types, complexity, cross-input validation, and validity of inputs controlled by a property value.

validateInputsImpl is called by the setup method before setupImpl. validateInputsImpl executes only once.

    Note:   You must set Access=protected for this method.

    You cannot modify any properties in this method. Use the processTunedPropertiesImpl method or setupImpl method to modify properties.

Input Arguments

obj

System object™ handle

input1,input2,...

Inputs to the setup method

Examples

expand all

Validate Input Type

Validate that the input is numeric.

methods (Access=protected)
   function validateInputsImpl(~,x)
      if ~isnumeric(x)
         error('Input must be numeric');
      end
   end
end

See Also

|

How To

Was this topic helpful?