| Stateflow® | ![]() |
API Object Reference | Alphabetical List |
|
Reference tables for Stateflow® API properties and methods have these columns:
Name — The name for the property or method. Each property or method has a name that you use in dot notation along with a Stateflow object to set or obtain the property's value or call the method.
Type — A data type for the property. Some types are other Stateflow API objects, such as the Machine property, which is the Machine object that contains this object.
Access — An access type for the property. Properties that are listed as RW (read/write) can be read and changed. For example, the Name and Description properties of particular objects are RW. However, some properties are RO (read-only) because they are set by the MATLAB® workspace itself.
Description — A description for the property or method. For some properties, the equivalent GUI operations for setting it are also given.
The following methods apply to all API objects including those of Stateflow® charts. Only object-exclusive methods appear when you use the method methods to display methods for an object. However, the tables of methods for each API object that follow do list these methods as if they were their own.
For details on each method, see API Method Reference.
Method | Description |
|---|---|
Delete this object. Used with all objects except the Root, Machine, Chart, Clipboard, and Editor objects. | |
Display the property names and their settings for this object. | |
Find all objects of this object that meet the specified criteria. | |
Return the specified property settings for this object. | |
Display all nonglobal methods of this object. | |
Set the specified property of this object with a specified value. | |
Return and display a MATLAB® structure containing the property settings of this object. | |
Return the parent (container) object of this object. |
Stateflow® API objects of type Box have the properties shown below. See also Box Methods.
Property | Type | Access | Description |
|---|---|---|---|
ArrowSize | Double | RW | Size of transition arrows coming into this box (default = 8). Equivalent to selecting Arrowhead Size from the context menu for this box. |
BadIntersection | Boolean | RO | If true, this box graphically intersects a state, Embedded MATLAB™ function, graphical function, truth table, or another box. |
Chart | Chart | RO | Chart object containing this box. |
Description | String | RW | Description of this box (default = ''). Equivalent to entering a description in the Description field of the Box properties dialog. |
Document | String | RW | Document link to this box (default = ''). Equivalent to entering the Document Link field of the Box properties dialog. |
FontSize | Double | RW | Size of the font (default = 12) for the label text of this box. This property overrides the font size set for this box 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 box. |
Id | Integer | RO | Unique identifier assigned to this box to distinguish it from other objects loaded in memory. |
IsGrouped | Boolean | RW | If set to true (default = false), group this box. |
IsSubchart | Boolean | RW | If set to true (default = false), make this box a subchart. |
LabelString | String | RW | Label for this box (default = '?'). Equivalent to typing the label for this box in its label text field in the Stateflow Editor. |
Machine | Machine | RO | Machine that contains this box. |
Name | String | RW | Name of this box (default = ''). Equivalent to typing this box's name into the beginning of the label text field for this box in the Stateflow Editor. |
Position | Rect | RW | Position and size of this 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 box can be graphically viewed. |
Tag | Any Type | RW | Holds data of any type (default = []) for this box. |
Box objects have the methods in the table below. For details on each method, see API Method Reference.
See also Box Properties.
Method | Description |
|---|---|
Return the default transitions in this box at the top level of containment. | |
Delete this box from the Stateflow® chart. | |
Display the Box properties dialog. | |
Display the property names and their settings for this Box object. | |
Find all objects that this box contains that meet the specified criteria. | |
Zoom in on this box and highlight it in the Stateflow Editor. | |
Return the specified property settings for this box. | |
Display a list of properties for this Box object with short descriptions. | |
Return the inner transitions that originate with this box and terminate on a contained object. | |
Display all nonglobal methods of this Box object. | |
Return an array of transitions that exit the outer edge of this box and terminate on an object outside the containment of this box. | |
Set the specified property of this Box object with the specified value. | |
Return all inner and outer transitions whose source is this box. | |
Return and display a MATLAB® structure containing the property settings of this Box object. | |
Display this box's chart in the Stateflow Editor with this box highlighted. |
Stateflow® API objects of type Chart have the properties shown below. See also Chart Methods.
Property | Type | Access | Description |
|---|---|---|---|
ChartColor | [R,G,B] | RW | Background color of this chart in a 1-by-3 RGB array (default = [1 0.9608 0.8824])with each value normalized on a scale of 0 to 1. |
ChartUpdate | Enum | RW | Activation method of this chart. Can be 'INHERITED' (default), 'DISCRETE', or 'CONTINUOUS'. Equivalent to the Update method field in the Chart properties dialog, which takes one of these selections: Inherited, Discrete, Continuous. |
Debug. | Boolean | RW | If set to true (default = false), set the chart entry breakpoint for this chart. Equivalent to selecting the Chart Entry check box in the Chart properties dialog. |
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 chart. Set to 'PARALLEL_AND' to specify parallel (AND) decomposition for these states. Equivalent to the Decomposition selection in the context menu for the Stateflow Editor. |
Description | String | RW | Description (default = '') of this state. Equivalent to entering a description in the Description field of the Chart properties dialog. |
Dirty | Boolean | RW | If set to true (default = false), this chart has changed since being opened or saved. |
Document | String | RW | Document link (default = '') to this chart. Equivalent to entering a link in the Document Link field of the Chart properties dialog. |
Editor | Editor | RO | Editor object for this chart. |
EnableBitOps | Boolean | RW | If set to true (default = false), enables C-like bit operations in generated code for this chart. Equivalent to selecting the Enable C-bit operations check box in the Chart properties dialog. |
EnableNonTerminalStates | Boolean | RW | If set to true (default = false), enables super step semantics for the chart, as described in Executing a Chart with Super Step Semantics in the Stateflow and Stateflow® Coder™ User's Guide. |
EnableZeroCrossings | Boolean | RW | If set to true (default = true), enables zero-crossing detection on state transitions for continuous-time simulation of Stateflow charts. Applies only when the ChartUpdate property for this chart is set to 'CONTINUOUS'. See When to Enable Zero-Crossing Detection in the Stateflow and Stateflow Coder User's Guide. |
ErrorColor | [R,G,B] | RW | Set the RGB color for errors in the Stateflow Editor in a 1-by-3 RGB array (default value [1 0 0]) with each value normalized on a scale of 0 to 1. Equivalent to changing the Error color in the Colors & Fonts dialog under Edit > Style. |
ExecuteAtInitialization | Boolean | RW | If set to true (default = false), this chart's state configuration is initialized at time zero instead of at the first input event. Equivalent to selecting the Execute (enter) Chart At Initialization check box in the Chart properties dialog. |
ExportChartFunctions | Boolean | RW | If set to true (default = false), graphical functions at chart level are made global. Equivalent to selecting the Export Chart Level Graphical Functions (Make Global) check box in the Chart properties dialog. |
Iced | Boolean | RO | Equivalent to property Locked (default = false) except that this property is used internally to lock this chart from change during activities such as simulation. |
Id | Integer | RO | Unique identifier assigned to this chart to distinguish it from other objects loaded in memory. |
| InitializeOutput | Boolean | RW | Applies the initial value of outputs every time a chart wakes up, not only at time 0. See Setting Properties for Individual Charts. |
JunctionColor | [R,G,B] | RW | Set the RGB color for junctions in the Stateflow Editor in a 1-by-3 RGB array (default value [0.6824 0.3294 0]) with each value normalized on a scale of 0 to 1. Equivalent to changing the Junction color in the Colors & Fonts dialog under Edit > Style. |
Locked | Boolean | RW | If set to true (default = false), mark this chart as read-only and prohibit any write operations on it. Equivalent to selecting the Lock Editor check box in the Chart properties dialog. |
Machine | Machine | RO | Machine that contains this chart. |
Name | String | RW | Name of this chart (default = 'Chart'). Equivalent to changing the name of this chart's Stateflow block in a Simulink® model. |
NonTerminalMaxCounts | String | RW | Maximum number of transitions a Stateflow chart can take in one super step. Applies only when EnableNonTerminalStates is true. See Executing a Chart with Super Step Semantics in the Stateflow and Stateflow Coder User's Guide. |
NonTerminalUnstableBehavior | Enum | RW | Behavior of a Stateflow chart during simulation if it exceeds the maximum number of transitions specified in the NonTerminalMaxCounts property in a super step before reaching a stable state. Set this property to 'PROCEED' (default) if you want the chart to go back to sleep with the last active state configuration. Set this property to 'THROW ERROR' if you want the chart to generate an error. Applies only when EnableNonTerminalStates is true. See Executing a Chart with Super Step Semantics in the Stateflow and Stateflow Coder User's Guide. |
SampleTime | String | RW | Sample time for activating this chart (default = ''). Applies only when the ChartUpdate property for this chart is set to 'DISCRETE' ( = Discrete in the Update method field in the Chart properties dialog). |
SelectionColor | [R,G,B] | RW | Color of selected items for this chart in a 1-by-3 RGB array (default value [1 0 0.5176]) with each value normalized on a scale of 0 to 1. Equivalent to changing the Selection color in the Colors & Fonts dialog under Edit > Style. |
StateColor | [R,G,B] | RW | Color of the state box in a 1-by-3 RGB array (default value [0 0 0]) with each value normalized on a scale of 0 to 1. Equivalent to changing the State/Frame color in the Colors & Fonts dialog under Edit > Style. |
StateFont. | Enum | RW | Font angle for the labels of State, Box, Function, and Note objects. Can be 'ITALIC' or 'NORMAL' (default). Equivalent to Italic and Regular settings when changing the font style of StateLabel in the Colors & Fonts dialog under Edit > Style. Use with property StateFont.Weight to achieve Bold Italic style. You can individually override this property with the Font.Angle property for Note objects. |
StateFont. | String | RW | Font style (default = 'Helvetica') used for the labels of State, Box, Function, and Note objects. Enter a string for the font name (there are no selectable values). Font remains set to previous font for unrecognized font strings. Equivalent to changing the font of StateLabel in the Colors & Fonts dialog under Edit > Style. |
StateFont. | Integer | RW | Default font size for the labels of a new State, Box, Function, or Note object. Equivalent to changing the font size of StateLabel in the Colors & Fonts dialog under Edit > Style. You can change the font size for an existing State, Box, or Function object with the FontSize property of that object. You can change the font size for an existing Note object with its Font.Size property. |
StateFont. | Enum | RW | Font weight for state labels. Can be 'BOLD' or 'NORMAL' (default). Equivalent to the Bold and Regular settings of StateLabel in the Colors & Fonts dialog under Edit > Style. Use with the property StateFont.Angle to achieve Bold Italic style. You can individually override this property with the Font.Weight property for Note objects. |
StateLabelColor | [R,G,B] | RW | Color of the state labels for this chart in a 1-by-3 RGB array (default = [0 0 0]) with each value normalized on a scale of 0 to 1. Equivalent to changing the label color of StateLabel in the Colors & Fonts dialog under Edit > Style. |
StateMachineType | Enum | RW | Type of state chart to create. Default is Classic, which provides the full set of Stateflow chart semantics. You can also create Mealy and Moore charts, which use a subset of Stateflow chart semantics (see Building Mealy and Moore Charts). |
StrongDataTyping | Boolean | RW | If set to true (default), set strong data typing with Simulink I/O. Equivalent to selecting the Use Strong Data Typing with Simulink I/O check box in the Chart properties dialog. |
Tag | Any Type | RW | A field you can use to hold data of any type for this chart (default = []). |
TransitionColor | [R,G,B] | RW | Set the RGB color for transitions in the Stateflow Editor in a 1-by-3 RGB array (default = [0.2902 0.3294 0.6039]) with each value normalized on a scale of 0 to 1. Equivalent to changing the Transition color in the Colors & Fonts dialog under Edit > Style. |
TransitionFont. | Enum | RW | Font angle for state labels. Can be 'ITALIC' or 'NORMAL' (default). Equivalent to Italic and Regular settings when you change the font style of TransitionLabel in the Colors & Fonts dialog under Edit > Style. Use with property StateFont.Weight to achieve Bold Italic style. |
TransitionFont. | String | RW | Font style (default = 'Helvetica') used for transition labels. Enter a string for font name (there are no selectable values). Font remains set to previous font for unrecognized font strings. Equivalent to changing the font of TransitionLabel in the Colors & Fonts dialog under Edit > Style. |
TransitionFont. | Integer | RW | Default font size (default = 12) for transition labels. Truncated to closest whole number less than or equal to entered value. Equivalent to changing the font size of TransitionLabel in the Colors & Fonts dialog under Edit > Style. |
TransitionFont. | Enum | RW | Font weight for transition labels. Can be 'BOLD' or 'NORMAL' (default). Equivalent to Bold and Regular settings when you change the font style of TransitionLabel in the Colors & Fonts dialog under Edit > Style. Use with property StateFont.Angle to achieve Bold Italic style. |
TransitionLabel | [R,G,B] | RW | Color of the transition labels for this chart in a 1-by-3 RGB array (default = [0.2902 0.3294 0.6039]) with each value normalized on a scale of 0 to 1. Equivalent to changing the label color of TransitionLabel in the Colors & Fonts dialog under Edit > Style. |
UserSpecifiedState | Boolean | RW | If set to true (default = false), you have complete control of the order in which transitions originating from a source are tested for execution. Equivalent to selecting the User specified state/transition execution order check box in the Chart properties dialog. |
Visible | Boolean | RW | If set to true (default), display this chart in the Stateflow Editor. |
Chart objects have the methods in the table below. For details on each method, see API Method Reference.
See also Chart Properties.
Method | Description |
|---|---|
Return the default transitions in this Stateflow® chart at the top level of containment. | |
Display the Chart properties dialog. | |
Display the property names and their settings for this Chart object. | |
Find all objects that this chart contains that meet the specified criteria. | |
Zoom in on this chart in the Stateflow Editor. | |
Return the specified property settings for this chart. | |
Display a list of properties for this Chart object with short descriptions. | |
Display all nonglobal methods of this Chart object. | |
Parse this chart. | |
Set the specified property of this Chart object with the specified value. | |
Return and display a MATLAB® structure containing the property settings of this Chart object. | |
Display this chart in the Stateflow Editor. |
The Clipboard object has the methods in the table below. For details on each method, see API Method Reference.
Method | Description |
|---|---|
Copy the objects specified to this Clipboard object. | |
Return the specified property settings for this Clipboard object. | |
Display a list of properties for this Clipboard object with short descriptions. | |
Display all nonglobal methods of this Clipboard object. | |
Paste the contents of this clipboard to the specified container object. | |
Set the specified property of this Clipboard object with the specified value. | |
Return and display a MATLAB® structure containing the property settings of this Clipboard object. |
The following methods create a new Stateflow® object for a parent object specified as an argument in the general expression o = Stateflow.Object(p), where o is a handle to an API object for the new Stateflow object, p is a handle to the parent object, and Object is the type of the object:
For details on each method, see API Method Reference.
Method | Description |
|---|---|
Create a box for a parent chart, state, box, or function. | |
Create a data for a parent machine, chart, state, box, or function. | |
Create an Embedded MATLAB™ function for a parent chart or state. | |
Create an event for a parent machine, chart, state, box, or function. | |
Create a graphical function for a parent chart, state, box, or function. | |
Create a junction for a parent chart, state, box, or function. | |
Create a note for a parent chart, state, box, or function. | |
Create a state for a parent chart, state, box, or function. | |
Create a target for a parent machine. | |
Create a transition for a parent chart, state, box, or function. | |
Create a truth table for a parent chart or state. |
Stateflow® API objects of type Data have the properties shown below. See also Data Methods.
Property | Type | Access | Description |
|---|---|---|---|
CompiledSize | String | RW | Size of data as determined by the compiler. |
CompiledType | String | RW | Type of data as determined by the compiler. |
Debug. | Integer | RW | If set to 1 (default = 0), causes the Debugger window to halt execution if this data is modified. Setting this property to 1 is equivalent to selecting the Watch in debugger check box in the Data properties dialog. |
Description | String | RW | Description of this data (default = ''). Equivalent to entering a description in the Description field of the Data properties dialog. |
Document | String | RW | Document link to this data (default = ''). Equivalent to entering a link in the Document link field of the Data properties dialog. |
Id | Integer | RO | Unique identifier assigned to this data to distinguish it from other objects in the model. |
InitializeMethod | String | RW | Method for initializing value of this data, based on scope of data:
|
Machine | Machine | RO | Stateflow machine that contains this data. |
Name | String | RW | Name of this data. Equivalent to entering the name of this data in the Name field of the Data properties dialog. |
OutputState | Integer | RO | If set to 1 (default = 0), this data represents the activity of the state in which it is defined as an output to a Simulink® model. See Outputting State Activity to a Simulink® Model in the Stateflow and Stateflow® Coder™ User's Guide. Create this data for a state by using the State method outputData. Equivalent to selecting the Output State Activity check box for the state. |
Path | String | RO | Location of this data in the model hierarchy |
Port | Integer | RW | Port index number for this data (default = 1). |
Props. | String | RW | Index of the first element of this data (default = 0) if it is an array (that is, Props.Array.Size > 1). Equivalent to entering a value of zero or greater in the First index field in the Data properties dialog. |
Props. | String | RW | Size of this data. Assigning a positive value indicates that the data is an array of the specified size (default = 0). Equivalent to entering a positive value in the Size column for this data in the Model Explorer or the Size field in the Data properties dialog. |
Props. | String | RW | Initial value of this data (default = ''). Equivalent to entering a value in the Initial value column for this data in the Model Explorer or theInitial value field in the Data properties dialog. |
Props. | String | RW | Maximum value (default = '') that this data can have during execution or simulation of the state machine. Equivalent to entering a value in the Maximum column for this data in the Model Explorer or the Maximum field in the Data properties dialog. |
Props. | String | RW | Minimum value (default = '') that this data can have during execution or simulation of the state machine. Equivalent to entering a value in the Minimum column for this data in the Model Explorer or the Minimum field in the Data properties dialog. |
Props. | String | RW | If Props.Method is Bus Object, you must set this property to the name of the Simulink.Bus object that defines this data (see Working with Structures and Bus Signals in Stateflow® Charts in the Stateflow and Stateflow Coder User's Guide). Equivalent to setting the data type Mode to Bus Object, and entering the name of a Simulink.Bus object in the Data Type Assistant of the Data properties dialog. |
Props. | String | RW | If Props.Method is Expression, you must set this property to an expression that evaluates to a data type (see Entering Expressions and Parameters for Data Properties in the Stateflow and Stateflow Coder User's Guide). Equivalent to setting the data type Mode to Expression, and entering an expression in the Data Type Assistant of the Data properties dialog. |
Props. | String | RW | The bias value for fixed-point data (default = 0.0) ifProps.Type.Fixpt.ScalingMode equals Slope and bias; otherwise this value is ignored. Equivalent to entering a real number in the Bias field of the Data Type Assistant in the Data properties dialog. |
Props. | String | RW | The location of the binary point in fixed-point data (default = 0) if Props.Type.Fixpt.ScalingMode equals Binary point; otherwise this value is ignored. Equivalent to entering a positive or negative integer in the Fraction length field of the Data Type Assistant in the Data properties dialog. |
Props. | Integer | RW | If set to 1 (default = 0), prevents a Simulink model from replacing the current fixed-point type with a type chosen by the autoscaling tool. Equivalent to selecting Lock output scaling against changes by the autoscaling tool in the Data properties dialog. |
Props. | String | RW | Method for scaling fixed point data to avoid overflow conditions and minimize quantization errors. There are three settings:
Equivalent to setting the Scaling field of the Data Type Assistant in the Data properties dialog. |
Props. | String | RW | The slope value for fixed-point data (default = 1.0) ifProps.Type.Fixpt.ScalingMode equals Slope and bias; otherwise this value is ignored. Equivalent to entering a positive real number in the Slope field of the Data Type Assistant in the Data properties dialog. |
Props. | String | RW | Method for setting the type of this data, based on scope:
Equivalent to setting the Mode field of the Data Type Assistant in the Data properties dialog. |
Props. | Integer | RW | If set to 1, indicates that fixed-point data should be signed. The default value is 0, indicating that the data is unsigned. Equivalent to setting the Sign field of the Data Type Assistant in the Data properties dialog. |
Props. | String | RW | Units of measurement for the data value (default = ''). |
Props. | String | RW | Size in bits of the word that will hold the quantized integer of fixed-point data. Equivalent to entering an integer between 0 and 32 in the Word length field of the Data Type Assistant in the Data properties dialog. |
Props. | Integer | RW | If set to 1, assigns the value of the data item to a variable of the same name in the model workspace at the end of simulation. The default value is 0, indicating that the data is not saved to the base workspace. Equivalent to selecting the check box Save final value to base workspace in the Data properties dialog. |
Scope | Enum | RW | Scope of this data:
Equivalent to setting the Scope field in the Data properties dialog. See Scope in the Stateflow and Stateflow Coder User's Guide. |
SaveTo | Integer | RW | If set to 1 (default = 0), this data is saved to the MATLAB workspace. Setting this property to 1 is equivalent to selecting the SaveToWorkspace column entry for this data in the Model Explorer or selecting the Save final value to base workspace field in the Data properties dialog. |
TestPoint | Integer | RW | If set to 1 (default = 0), sets this data 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 Test Points in Stateflow® Charts in the Stateflow and Stateflow Coder User's Guide. |
Data objects have the methods in the table below. For details on each method, see API Method Reference.
See also Data Properties.
Method | Description |
|---|---|
Delete this data. | |
Display the Data properties dialog. | |
Display the property names and their settings for this Data object. | |
Return the specified property settings for this data. | |
Display a list of properties for this Data object with short descriptions. | |
Display all nonglobal methods of this Data object. | |
Set the specified property of this Data object with the specified value. | |
Return and display a MATLAB® structure containing the property settings of this Data object. | |
Display this data in the Data properties dialog. |
The Editor object has the properties shown below. See also Editor Methods.
Property | Type | Access | Description |
|---|---|---|---|
WindowPosition | Rect | RW | Position and size of this Stateflow® chart given in the form of a 1-by-4 array consisting of the following:
Default value = [124.3125 182.8125 417 348.75] |
ZoomFactor | Double | RW | View magnification level (zoom factor) of this chart in the Stateflow Editor. A value of 1 corresponds to a zoom factor of 100%, 2 to a value of 200%, and so on. Default value = 1. |
The Editor object has the methods in the table below. For details on each method, see API Method Reference.
See also Editor Properties.
Method | Description |
|---|---|
Display the property names and their settings for this Editor object. | |
Return the specified property settings for the Editor object. | |
Display a list of properties for this Editor object with short descriptions. | |
Display all nonglobal methods of this Editor object. | |
Set the specified property of this Editor object with the specified value. | |
Return and display a MATLAB® structure containing the property settings of this Editor object. | |
Cause the Stateflow® chart to zoom in or zoom out in the Stateflow Editor. |
Stateflow® API objects for Embedded MATLAB™ functions have the properties shown below. See also Embedded MATLAB™ Function Methods.
Property | Type | Access | Description |
|---|---|---|---|
ArrowSize | Double | RW | Size of transition arrows coming into the Embedded MATLAB function in the Stateflow chart (default = 8). Equivalent to selecting Arrowhead Size from the context menu for this function. |
BadIntersection | Boolean | RO | If true, this Embedded MATLAB function graphically intersects a state, box, graphical function, truth table, or another Embedded MATLAB function. |
Chart | Chart | RO | Chart object containing this Embedded MATLAB function. |
Description | String | RW | Description of this Embedded MATLAB function (default = ''). Equivalent to entering a description in the Description field of the properties dialog for this Embedded MATLAB function. |
Document | String | RW | Document link to this Embedded MATLAB function. Equivalent to entering the Document Link field of the properties dialog for this Embedded MATLAB function. |
FontSize | Double | RW | Size of the (default = 12) font of the label text for this Embedded MATLAB function. This property overrides the font size set for this Embedded MATLAB function at creation by the StateFont.Size property of the containing Chart object. Equivalent to selecting Font Size > font size in the context menu for this Embedded MATLAB function. |
Id | Integer | RO | Unique identifier assigned to this Embedded MATLAB function to distinguish it from other objects in the model. |
LabelString | String | RW | Full label for this Embedded MATLAB function (default = '()') including its return, name, and arguments. Equivalent to typing the label for this Embedded MATLAB function in its label text field in the Stateflow Editor. |
Machine | Machine | RO | Machine that contains this Embedded MATLAB function. |
Name | String | RW | Name of this Embedded MATLAB function (default = ''). Equivalent to typing a name for this Embedded MATLAB function into the label text field of the truth table box in the Stateflow Editor. Label syntax is return = Name (arguments). |
Position | Rect | RW | Position and size of this Embedded MATLAB function in the Stateflow chart, given in the form of a 1-by-4 array (default is [0 0 90 60]) consisting of the following:
|
Script | String | RW | String that holds the lines of code in an Embedded MATLAB function. For example, you can use the property to define code in this way: fcn = Stateflow.EMFunction(c);
str = sprintf('y=proc(x)\n y=x;');
fcn.script = str; |
Subviewer | Chart or State | RO | State or chart in which you can graphically view this Embedded MATLAB function. |
Tag | Any Type | RW | Holds data of any type (default = []) for this Embedded MATLAB function. |
Embedded MATLAB™ Function objects have the methods in the table below. For details on each method, see API Method Reference.
See also Embedded MATLAB™ Function Properties.
Method | Description |
|---|---|
Delete this Embedded MATLAB function from the Stateflow® chart. | |
Display the properties dialog of this Embedded MATLAB function. | |
Display the property names and their settings for this Embedded MATLAB function object. | |
Find all objects that this Embedded MATLAB function contains that meet the specified criteria. | |
Zoom in on this Embedded MATLAB function and highlight it in the Stateflow Editor. | |
Return the specified property settings for this Embedded MATLAB functions. | |
Display a list of properties for this Embedded MATLAB function with short descriptions. | |
Display all nonglobal methods of this Embedded MATLAB object. | |
Set the specified property of this Embedded MATLAB object with the specified value. | |
Return and display a MATLAB® structure containing the property settings of this Embedded MATLAB object. | |
Opens this Embedded MATLAB function in the Embedded MATLAB Editor. |
Stateflow® API objects of type Event have the properties shown below. See also Event Methods.
Property | Type | Access | Description |
|---|---|---|---|
Debug. | Boolean | RW | If set to true (default = false), set a debugger breakpoint for the start of the broadcast of this event. Equivalent to selecting the Start of broadcast check box in the Event properties dialog. |
Debug. | Boolean | RW | If set to true (default = false), set a debugger breakpoint for the end of the broadcast of this event. Equivalent to selecting the End of broadcast check box in the Event properties dialog. |
Description | String | RW | Description of this event (default = ''). Equivalent to entering a description in the Description field in the Event properties dialog. |
Document | String | RW | Document link to this event (default = ''). Equivalent to entering the Document Link field in the Event properties dialog. |
Id | Integer | RO | Unique identifier assigned to this event to distinguish it from other objects in the model. |
Machine | Machine | RO | Machine to which this event belongs. |
Name | String | RW | Name of this event (default = eventn, where n is a counter of events with the name root event). Equivalent to entering the name in the Name field of the Event properties dialog. |
Port | Integer | RO | Port index number for this event (default = 1). |
Scope | Enum | RW | Scope of this event. Allowed values vary with the object containing this data. The following applies to any event:
The following apply to events for charts only:
The following apply to events for machines only:
|
Tag | Any Type | RW | Holds data of any type (default = []) for this event. |
Trigger | Enum | RW | Type of signal that triggers this chart input event. Also the type of trigger associated with this chart output event. Equivalent to the entries for the Trigger field in the Event properties dialog. The following triggers apply to both chart input and output events:
The following triggers apply only to chart input events:
|
Event objects have the methods in the table below. For details on each method, see API Method Reference.
See also Event Properties.
Method | Description |
|---|---|
Delete this event. | |
Display the Event properties dialog. | |
Display the property names and their settings for this Event object. | |
Return the specified property settings for this event. | |
Display a list of properties for this Event object with short descriptions. | |
Display all nonglobal methods of this Event object. | |
Set the specified property of this Event object with the specified value. | |
Return and display a MATLAB® structure containing the property settings of this Event object. | |
Display this event in its properties dialog. |
Stateflow® API objects of type Function have the properties shown below. See also Graphical Function Methods.
Property | Type | Access | Description |
|---|---|---|---|
ArrowSize | Double | RW | Size of transition arrows coming into this graphical function (default = 8). Equivalent to selecting Arrowhead Size from the context menu for this function. |
BadIntersection | Boolean | RO | If true, this function graphically intersects a state, box, Embedded MATLAB™ function, truth table, or another graphical function. |
Chart | Chart | RO | Chart object containing this function. |
Debug. | Boolean | RW | If true, sets the during breakpoint for this graphical function. Equivalent to selecting the Function Call check box in the properties dialog for this graphical function. |
Description | String | RW | Description of this function (default = ''). Equivalent to entering a description in the Description field of the properties dialog for this graphical function. |
Document | String | RW | Document link to this function. Equivalent to entering a link in the Document Link field of the properties dialog for this graphical function. |
FontSize | Double | RW | Size of the (default = 12) font of the label text for this function. This property overrides the font size set for this function 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 graphical function. |
Id | Integer | RO | Unique identifier assigned to this function to distinguish it from other objects in the model. |
InlineOption | Boolean | RW | Determine how generated code for this graphical function is implemented. Possible settings are as follows: 'Inline' — Call to function is replaced by code. 'Function' — Function becomes a C function. 'Auto' — Determines if the function is inlined or made a function through an internal calculation. |
IsGrouped | Boolean | RW | If set to true (default = false), group this function. |
IsSubchart | Boolean | RW | If set to true (default = false), make this function a subchart. |
LabelString | String | RW | Label for this function (default = '()'). Equivalent to typing the label for this function in its label text field in the Stateflow Editor. |
Machine | Machine | RO | Machine that contains this function. |
Name | String | RW | Name of this function (default = ''). Equivalent to typing this function's name into the beginning of the label text field after the word 'function' in the Stateflow Editor. |
Position | Rect | RW | Position and size of this function'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 function can be graphically viewed. |
Tag | Any Type | RW | Holds data of any type (default = []) for this function. |
Function objects have the methods in the table below. For details on each method, see API Method Reference.
See also Graphical Function Properties.
Method | Description |
|---|---|
Return the default transitions in this function at the top level of containment. | |
Delete this function from the Stateflow® chart. | |
Display the properties dialog of this graphical function. | |
Display the property names and their settings for this Function object. | |
Find all objects that this graphical function contains that meet the specified criteria. | |
Zoom in on this graphical function and highlight it in the Stateflow Editor. | |
Return the specified property settings for this function. | |
Display a list of properties for this Function object with short descriptions. | |
Display all nonglobal methods of this Function object. | |
Set the specified property of this Function object with the specified value. | |
Return all inner and outer transitions whose source is this function. | |
Return and display a MATLAB® structure containing the property settings of this Function object. | |
Display this function's chart in the Stateflow Editor with this state highlighted. |
Stateflow® API objects of type Junction have the properties shown below. See also Junction Methods.
Property | Type | Access | Description |
|---|---|---|---|
ArrowSize | Double | RW | Size of transition arrows (default = 8) coming into this junction. |
Chart | Chart | RO | Chart that this junction resides in. |
Description | String | RW | Description of this junction (default = ''). Equivalent to entering a description in the Description field of the Junction properties dialog. |
Document | String | RW | Document link to this junction (default = ''). Equivalent to entering the Document Link field of the Junction properties dialog. |
Id | Integer | RO | Unique identifier assigned to this junction to distinguish it from other objects in the model. |
Machine | Machine | RO | Machine containing this junction. |
Position. | Rect | RW | Position of the center of this junction (default = [10 10]) relative to the upper left corner of the parent chart or state as an [x,y] point array. |
Position. | Rect | RO | Radius of this junction (default = 10). |
Subviewer | Chart or State | RO | State or chart in which this junction can be graphically viewed. |
Tag | Any Type | RW | Holds data of any type (default = []) for this junction. |
Type | Enum | RO | Type of this junction. For junctions, can be 'CONNECTIVE' (default) or 'HISTORY' |
Junction objects have the methods in the table below. For details on each method, see API Method Reference.
See also Junction Properties.
Method | Description |
|---|---|
Delete this junction from the Stateflow® chart. | |
Display the Junction properties dialog. | |
Display the property names and their settings for this Junction object. | |
Zoom in on this junction and highlight it in the Stateflow Editor. | |
Return the specified property settings for this junction. | |
Display a list of properties for this Junction object with short descriptions. | |
Display all nonglobal methods of this Junction object. | |
Set the specified property of this Junction object with the specified value. | |
Return all inner and outer transitions whose source is this junction. | |
Return and display a MATLAB® structure containing the property settings of this Junction object. | |
Display this junction's chart in the Stateflow Editor with this junction highlighted. |
Stateflow® API objects of type Machine have the properties shown below. See also Machine Methods.
Property | Type | Access | Description |
|---|---|---|---|
Created | String | RO | Date of creation of this machine. |
Creator | String | RW | Creator (default = 'Unknown') of this machine. |
Debug. | Boolean | RW | If set to true (default), animation (simulation) is enabled. If false, disabled. Equivalent to the Enabled or Disabled radio button of the Animation section of the Debugger window. |
Debug. | Double | RW | Specify a value to delay (slow down) animation (default value = 0). Equivalent to the Delay (sec) field in the Animation section of the Debugger window. |
Debug. | Boolean | RW | If set to true (default = false), set the chart entry breakpoint for all charts in this machine. Equivalent to the Chart Entry check box in the Debugger window. |
Debug. | Boolean | RW | If set to true (default = false), set the event broadcast breakpoint for all charts in this machine. Equivalent to the Event Broadcast check box in the Debugger window. |
Debug. | Boolean | RW | If set to true (default = false), set the state entry breakpoint for all charts in this machine. Equivalent to the State Entry check box in the Debugger window. |
Debug. | Boolean | RW | If set to true (default = false), disable the use of all breakpoints in this machine. Equivalent to the Disable all check box in the Debugger window. |
Debug. | Boolean | RW | If set to true, check for cyclical behavior errors during a debug session. Equivalent to the Detect Cycles check box in the Debugger window. |
Debug. | Boolean | RW | If set to true (default), check for data range violations during a debug session. Equivalent to the Data Range check box in the Debugger window. |
Debug. | Boolean | RW | If set to true (default), check for state inconsistencies during a debug session. Equivalent to the State Inconsistency check box in the Debugger window. |
Debug. | Boolean | RW | If set to true (default), check for transition conflicts during a debug session. Equivalent to the Transition Conflict check box in the Debugger window. |
Description | String | RW | Description of this state (default = ''). Equivalent to entering a description in the Description field of the properties dialog for this machine. |
Dirty | Boolean | RW | If true (default), this model has changed since it was opened or saved. |
Document | String | RW | Document link to this machine (default = ''). Equivalent to entering the Document Link field of the properties dialog for this machine. |
EnableBitOps | Boolean | RW | If true, recognize C bitwise operators (~, &, |, ^, >>, and so on) in action language statements for all Stateflow charts in the model and encode them as C bitwise operations. |
FullFileName | String | RO | Full path name of file (default value = '') under which this machine (model) is stored. |
Iced | Boolean | RO | Equivalent to property Locked (default = false) except that this property is used internally to lock this model from being changed during activities such as simulation. |
Id | Integer | RO | Unique identifier assigned to this machine to distinguish it from other objects loaded in memory. |
isLibrary | Boolean | RO | If true (default = false), specifies that the current model builds a library and not an application. |
Locked | Boolean | RW | If set to true (default = false), prevents user from changing any Stateflow chart in this model. |
Machine | Machine | RO | A handle to the Machine object for this Machine object, that is, this Machine object. |
Modified | String | RW | Comment area (default = '') for entering date and name of modification to this model. |
Name | String | RO | Name of this model (default = 'untitled') set when saved to disk. |
SfVersion | Double | RO | Full version number for current Stateflow software. For example, the string '41112101' appears for Stateflow software version 4.1.1 and MATLAB® software version 12.1. The remaining '01' is for internal use. |
Tag | Any Type | RW | A field you can use to hold data of any type for this machine (default = []). |
Version | String | RW | Comment string (default = 'none') for recording the version of this model. |
Machine objects have the methods in the table below. For details on each method, see API Method Reference.
See also Machine Properties.
Method | Description |
|---|---|
Display the properties dialog of this machine. | |
Display the property names and their settings for this Machine object. | |
Find all objects that this machine contains that meet the specified criteria. | |
Return the specified property settings for this machine. | |
Display a list of properties for this Machine object with short descriptions. | |
Display all nonglobal methods of this Machine object. | |
Parse all the charts in this machine. | |
Set the specified property of this Machine object with the specified value. | |
Return and display a MATLAB® structure containing the property settings of this Machine object. |
Stateflow® API objects of type Note have the properties shown below. See also Note Methods.
Property | Type | Access | Description |
|---|---|---|---|
Alignment | Enum | RW | Alignment of text in note box. Can be 'LEFT' (default), 'CENTER', or 'RIGHT'. |
Chart | Chart | RO | Chart object containing this note. |
Description | String | RW | Description of this note (default = ''). Equivalent to entering a description in the Description field of the Note properties dialog. |
Document | String | RW | Document link to this note (default = ''). Equivalent to entering a link in the Document Link field of the Note properties dialog. |
Font. | String | RO | Name of the font (default = 'Helvetica') for the text in this note. This property is read-only (RO) and set by the StateFont.Name property of the Chart object containing this note. |
Font. | String | RW | Style of the font for the text in this note. Can be 'ITALIC' or 'NORMAL' (default). This property overrides the default style for this note, which is set by the StateFont.Angle property of the Chart object containing this note. |
Font. | Double | RW | Size of the font (default = 12) for the label text for this note. This property overrides the font size set for this note 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 note. |
Font. | String | RW | Weight of the font for the label text for this note. Can be 'BOLD' or 'NORMAL' (default). This property overrides the default weight for the text in this note, which is set by the StateFont.Weight property of the Chart object containing this note. |
Id | Integer | RO | Unique identifier assigned to this note to distinguish it from other objects in the model. |
Interpretation | Enum | RW | How the text in this note is interpreted for text processing. Can be 'NORMAL' (default) or |