メインコンテンツ

Graphical Function

R2026b

Graphical function that uses flow charts

Description

A graphical function defines control-flow logic and iterative loops by using flow charts with connective junctions and transitions inside a Stateflow® chart. Call a graphical function in the actions of states and transitions.

To add a graphical function to a chart:

  1. In the Stateflow Editor, in the object palette, click the Graphical Function icon The graphical function object palette icon..

  2. Click a location in the chart canvas to place the graphical function.

  3. Type a function signature in the format y = f(x).

Properties

expand all

To edit graphical object properties interactively, right-click the object and select Properties.

To modify graphical function properties programmatically, use Stateflow.Function objects.

General

Name of the graphical function in the chart hierarchy. This property is read-only. Click the hyperlink to navigate to the graphical function in the Stateflow Editor. To change the name, edit the Label property.

Appearance of the graphical function in generated code, specified as one of these values:

  • Auto — An internal calculation determines the appearance of the function in generated code.

  • Function — A separate C function implements the function.

  • Inline — If the function is not part of a recursion, calls to the function are replaced by code.

Label for the graphical function, specified as a character vector. The label defines the function signature, including its input and output arguments, as it appears in the Stateflow Editor.

Version History

Introduced before R2006a