Main Content

Stateflow.Data

Create data

Syntax

data_new = Stateflow.Data(parent)

Description

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

Arguments

parent

Handle to an object for the parent machine, chart, state, box, or function of the new data

Returns

data_new

Handle to the Data object for the new data

Examples

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

data_new = Stateflow.Data(sA)

The new data is named 'data' with an incremented integer suffix to distinguish additional creations. data_new is a handle to the Data object for the new data.

Introduced before R2006a