Main Content

Stateflow.EMFunction

Create MATLAB function

Syntax

efunction_new = Stateflow.EMFunction(parent)

Description

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.

Arguments

parent

Handle to parent chart, state, box, or function of the new MATLAB function

Returns

efunction_new

Handle to a Function object for the new MATLAB function

Examples

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.

Introduced before R2006a