Main Content

getImpulseResponseLengthImpl

Class: matlab.System

Define length of input effects for dataflow subsystems

Syntax

impulseLength = getImpulseResponseLengthImpl(obj)
impulseLength = getImpulseResponseLengthImpl(obj,input1, input2, ...)

Description

impulseLength = getImpulseResponseLengthImpl(obj) defines the impulse response length of a System object™ that is independent of input specifications.

impulseLength = getImpulseResponseLengthImpl(obj,input1, input2, ...) defines the impulse response length for obj as a function of one or more of its input specifications.

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 getImpulseResponseLengthImpl method does not use the object, you can replace this input with ~.

List the inputs to the System object. The order of inputs must match the order of inputs defined in the stepImpl method. stepImpl passes the inputs into setupImpl to use the specifications, such as size and data types in the one-time calculations.

Output Arguments

expand all

The impulse response length of an object, or number of input samples that affect the output of a block. The impulse response length is used by dataflow to optimize the automatic partitioning of a dataflow subsystem for multithreaded simulation and code generation.

Examples

expand all

When the impulse response length of a system object is constant, specify the number of input samples that affect the output of the block.

function s = getImpulseResponseLengthImpl(obj)
    s = 50;
end

When inputs to the system object affect the length of the impulse response, specify the inputs in the function signature.

function s = getImpulseResponseLengthImpl(obj, X, COEFF)
    if isequal(obj.NumeratorSource, ‘Property’)
        s = numel(obj.Numerator) - 1;
    else
        s = numel(COEFF) - 1;
    end
end

Version History

Introduced in R2018b