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