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.

Reusable Functions in Charts

State actions and transition conditions can be complicated enough that defining them inline on the state or transition is not feasible. In this case, express the conditions or actions using one of the following types of Stateflow® functions:

Use the function format that is most natural for the type of calculation required in the state action or transition condition.

If the four standard types of Stateflow functions do not work, you can write your own C or C++ code for integration with your chart. For more information about custom code integration, see Reuse Custom Code in Stateflow Charts.

Related Topics