Call Graphical Functions in States and Transitions


Syntax for a function call is the same as that of a function signature, with actual arguments replacing the formal ones specified in a signature. If the data types of the actual and formal argument differ, a function casts the actual argument to the type of the formal argument. See Create a Graphical Function for information about syntax for a function signature.

    Tip   If the formal arguments of a function signature are scalars, verify that inputs and outputs of function calls follow the rules of scalar expansion. For more information, see How Scalar Expansion Works for Functions.


In this example, a state entry action calls a graphical function that returns three products.

Was this topic helpful?