Skip to Main Content Skip to Search
Product Documentation

Stateflow.SLFunction - Constructor for creating Simulink function

Syntax

sl_function = Stateflow.SLFunction(parent)

Description

The Stateflow.SLFunction method is a constructor method for creating a Simulink function for a parent chart or state that returns a handle to the new Simulink Function object.

Arguments

parent

Handle to the object for the parent chart or state for the new Simulink Function object

Returns

sl_function

Handle to the newly created Simulink Function object

Examples

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.

  


Free Stateflow Interactive Kit

Learn how engineers use Stateflow to model state machines in their Simulink models.


Get free kit

Trials Available

Try the latest version of Stateflow.


Get trial software
 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS