Main Content

Stateflow.Function

Create graphical function

Syntax

function_new = Stateflow.Function(parent)

Description

The Stateflow.Function method is a constructor method for creating a graphical function in a parent chart, state, box, or graphical function. This method returns a handle to the new Function object.

Arguments

parent

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

Returns

function_new

Handle to a Function object for the new graphical function

Examples

If sA is a handle to a State object for the existing state A, the following command creates a new graphical function parented (or contained) by state A:

function_new = Stateflow.Function(sA)

The new graphical function is unnamed and appears in the upper left corner inside state A in the chart. function_new is a handle to the Function object for the new graphical function that you use to rename the function, set its properties, and execute its methods.