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.

Implement Blocks with System Objects

Use a System object™ in Simulink® using MATLAB System blocks

MATLAB System block uses System object to implement MATLAB® algorithms in Simulink. Before you begin using a MATLAB System block, you must have a System object to associate with a block. A System object is a special kind of MATLAB class and they are designed specifically for the implementation and simulation of dynamic systems.

Blocks

MATLAB SystemInclude System object in model

Examples and How To

Implement a MATLAB System Block

Implement a block and assign a System object to it.

Change Blocks Implemented with System Objects

Implement a block with another System object.

Specify Sample Time for MATLAB System Block

The sample time of a block is a parameter that indicates when the block produces an output, and eventually updates its internal state.

Call Simulink Functions from MATLAB System Block

Learn to call a Simulink function from a MATLAB System block

Change Block Icon and Port Labels

Change the icon appearance of your block with the matlab.system.mixin.CustomIcon class.

Add and Implement Propagation Methods

To define output specifications, use propagation methods.

Use System Objects in Feedback Loops

To process nondirect feedthrough data through the System object, use the matlab.system.mixin.Nondirect class.

Share Data with Other Blocks

Share data between MATLAB System and other blocks using the global keyword and the Data Store Memory block or Simulink.Signal object.

Concepts

MATLAB System Block

Implement your own algorithms using System objects.

Mapping System Objects to Block Dialog Box

The System object source code controls the appearance of the block dialog box.

Simulation Modes

You can use MATLAB System block in Simulink models for simulation via interpreted execution or code generation.

Simulink Engine Interaction with System Object Methods

Follow a process view of the order in which the MATLAB System block invokes System object methods within the context of the Simulink engine.

Nonvirtual Buses and MATLAB System Block

Use nonvirtual buses as input and output signals

Share Data with Other Blocks

Share data between MATLAB System and other blocks using the global keyword and the Data Store Memory block or Simulink.Signal object.

Considerations for Using System Objects in Simulink

Consider these guidelines when working with variable-size signals, tunable parameters, and For Each subsystems.

Troubleshooting

Troubleshoot System Objects in Simulink

Use these guidelines to troubleshoot System objects in Simulink.

Related Information

System Objects (MATLAB)

Featured Examples