matlab.System.processInputSpecificationChangeImpl - Perform actions when input size, complexity, or data type change - MATLAB (original) (raw)

Main Content

Class: matlab.System

Perform actions when input size, complexity, or data type change

Syntax

processInputSpecificationChangeImpl(obj,input,input2, ...)

Description

processInputSpecificationChangeImpl([obj](#mw%5Fd22a47d9-da2a-4906-a160-5eef4b43f201%5Fsep%5Fmw%5F353aa417-3412-46f8-81f1-586adf7da5a8),`input,input2, ...`) implements specific actions when the input specification changes, such as data type, size, or complexity. You use this method when properties depend on the data type, size, or complexity of inputs.

Run-Time Details

processInputSpecificationChangeImpl is called when running the System objectâ„¢ using the object name or step. For details, see Detailed Call Sequence

Method Authoring Tips

You must set Access = protected for this method.

Input Arguments

expand all

System object handle used to access properties, states, and methods specific to the object. If your processInputSpecificationChangeImpl method does not use the object, you can replace this input with ~.

Inputs to the algorithm (stepImpl) of the System object. The inputs list must match the order of inputs in the stepImpl signature.

Examples

expand all

This example shows how to use processInputSpecificationChangeImpl to modify the NumIterations property when the size of x changes. Even though this method does not take action when the additional varargin inputs change, they are included in the method signature.

methods (Access = Protected) function y = stepImpl(obj,x,varargin) for n=1:obj.NumIterations y end end function processInputSpecificationChangeImpl(obj,x,varargin) obj.NumIterations = size(x,1); end end

Version History

Introduced in R2018a