processInputSpecificationChangeImpl

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

Syntax

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

Description

processInputSpecificationChangeImpl(obj,input,input2, ... inputN) 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.

processInputSpecificationChangeImpl is called when running the System object using the object name or step. See Summary of Call Sequence.

This method is part of the matlab.System class.

Note

You must set Access = protected for this method.

Input Arguments

expand all

System object for which you want to process input changes

Inputs to the algorithm (stepImpl) of the System object. The inputs list must match the number 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

Introduced in R2018a

Was this topic helpful?