Documentation

This is machine translation

Translated by Microsoft
Mouse over text to see original. Click the button below to return to the English verison of the page.

validateInputsImpl

Class: matlab.System
Package: matlab

Validate inputs to System object

Syntax

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

Description

validateInputsImpl(obj,input1,input2,...) validates inputs to the System object™ the first time the object runs. 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 that the input is numeric.

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