This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

MATLAB System Block with Variable-Size Input and Output Signals

This example shows how to use the MATLAB System block to create Simulink® blocks with variable-size input and output signals.

It highlights two MATLAB System blocks. Both blocks use the same System object™ whose MATLAB source code you can access by clicking the "Source Code" hyperlink from the block dialog.

This System object inherits from the interface classes matlab.System and matlab.system.mixin.Propagates. The interface class matlab.System is required for all System objects. To use variable-size signals with a MATLAB System block, also inherit your System object from matlab.system.mixin.Propagates.

The System object specifies whether each output is fixed-size or variable-size. It also specifies the size, type, and complexity of each output. The output signals of the block represent the linear indices and elements of the input that conform to the condition specified in the block dialog.