Main Content

Simulink Functions

Call Simulink® function-call subsystems directly to streamline design

By using Simulink functions, you can call Simulink subsystems in the state and transition actions of a Stateflow® chart to create more efficient, readable models.


Reuse Simulink Functions in Stateflow Charts

Create and execute Simulink functions in Stateflow.

Bind a Simulink Function to a State

Specify the behavior of subsystem variables between function executions.

Design Charts with Simulink Functions

Replace a function-call subsystem with a Simulink function in a Stateflow chart.

Schedule Execution of Multiple Controllers

Use Simulink functions to improve the design of a Stateflow chart.

Reuse Functions by Using Atomic Boxes

Encapsulate reusable functions in a separate namespace.

Guidelines for Using Simulink Functions

By using alphanumeric characters for argument names, you ensure that the names of Inport and Output blocks are compatible with the identifier naming rules of Stateflow charts.

Featured Examples