Create Simulink function
Simulink_function_new = Stateflow.SLFunction(parent)
The Stateflow.SLFunction
method is a constructor method for creating a
Simulink® function in a parent chart, state, box, or graphical function. This
method returns a handle to the new SLFunction
object.
| Handle to the object for the parent chart, state, box, or function for the new Simulink Function object |
| Handle to the newly created Simulink Function object |
If sA
is a handle to a State object for the
existing state A
, the following command creates
a new Simulink function parented (contained) by state A
:
sl_function = Stateflow.SLFunction(sA)
The new Simulink function appears in the upper left corner
of state A
in the chart. sl_function
is
a handle to the new Simulink function that you can use to rename
the function, set its properties, and execute its methods.