| Stateflow User's Guide | ![]() |
Stateflow API objects of type State have the properties listed in the table below. See also State Methods.
| Property |
Type |
Acc |
Description |
ArrowSize |
Double |
RW |
Size of transition arrows coming into this state (default = 8). Equivalent to selecting Arrowhead Size from the context menu for this state. |
BadIntersection |
Boolean |
RO |
If true, this state graphically intersects a box, graphical function, or other state. |
Chart |
Chart |
RO |
Chart object containing this state. |
Debug.Breakpoints.onDuring |
Boolean |
RW |
If set to true (default = false), set the state entry breakpoint for this chart. Equivalent to selecting the State During check box in the properties dialog for this state. |
Debug.Breakpoints.OnEntry |
Boolean |
RW |
If set to true (default = false), set the state entry breakpoint for this chart. Equivalent to selecting the State Entry check box in the properties dialog for this state. |
Debug.Breakpoints.onExit |
Boolean |
RW |
If set to true (default = false), set the state entry breakpoint for this chart. Equivalent to selecting the State Exit check box in the properties dialog for this state. |
Decomposition |
Enum |
RW |
Set this property to 'EXCLUSIVE_OR' (default) to specify exclusive (OR) decomposition for the states at the first level of containment in this state.Set to 'PARALLEL_AND' to specify parallel (AND) decomposition for these states. Equivalent to the Decomposition selection in the context menu for the state. |
Description |
String |
RW |
Description of this state (default = ''). Equivalent to entering a description in the Description field of the properties dialog for this state. |
Document |
String |
RW |
Document link to this state (default = ''). Equivalent to entering the Document Link field of the properties dialog for this state. |
| FontSize |
Double |
RW |
Size of the font (default = 12) for the label text for this state. This property overrides the font size set for this state at creation by the StateFont.Size property of the containing Chart's object. Equivalent to selecting Font Size > <font size> in the context menu for this state. |
| HasOutputData |
Boolean |
RW |
If set to true (default = false), create a data output port on the Stateflow block for this state with its activity status. If the state is active, the output value is 1. If the state is inactive, the output is 0. This is equivalent to selecting the Output State Activity check box in the State properties dialog for this state. |
Id |
Integer |
RO |
Unique identifier assigned to this state to distinguish it from other objects loaded in memory. |
| IsGrouped |
Boolean |
RW |
If set to true (default = false), group this state.Nothing is allowed to change inside a grouped state. This property is also useful for copying states to a new location. See Copying by Grouping (Recommended). |
| IsSubchart |
Boolean |
RW |
If set to true (default = false), make this state a subchart. |
| IsTestPoint |
Boolean |
RW |
If set to true (default = false), sets this data or state as a Stateflow test point. You can monitor individual Stateflow test points with a floating scope during model simulation. You can also log test point values into MATLAB workspace objects. See Monitoring Stateflow Test Points in the Stateflow and Stateflow Coder User's Guide documentation for details. |
LabelString |
String |
RW |
Label for this state (default = '?'). Equivalent to typing the label for this state in its label text field in the diagram editor. |
Machine |
Machine |
RO |
Machine containing this state. |
Name |
String |
RW |
Name of this state (default = ''). Equivalent to typing this state's name into the beginning of the label text field for this state in the diagram editor. Name is separated from the remainder of this state's label text by a forward slash (/) character. |
Position |
Rect |
RW |
Position and size of this state's box in the Stateflow chart, given in the form of a 1-by-4 array (default is [0 0 90 60]) consisting of the following: |
Subviewer |
Chart or State |
RO |
State or chart in which this state can be graphically viewed. |
| Tag |
Any Type |
RW |
Holds data of any type (default = []) for this state. |
Type |
Enum |
RO |
Type of this state (default = 'OR'). Can be 'OR' (exclusive) or 'AND' (parallel). The type of this state is determined by the parent's Decomposition property. |
| Chart Methods | State Methods | ![]() |
© 1994-2005 The MathWorks, Inc.