Stateflow    

Calling Graphical Functions

Any state or transition action that is in the scope of a graphical function can invoke that function. The invocation syntax is the same as that of the function prototype, with actual arguments replacing the formal parameters specified in the prototype. If the data types of the actual and formal argument differ, Stateflow casts the actual argument to the type of the formal parameter. The following example shows a state entry action that invokes a function that returns the product of its arguments.


  Creating a Graphical Function Exporting Graphical Functions