| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → Stateflow |
| Contents | Index |
| Learn more about Stateflow |
|
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 box. |
Document | String | RW | Document link to this box (default = ''). Equivalent to entering the Document Link field of the Box properties dialog box. |
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 box. | |
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 | Set the background color of your chart by using 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 box, 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 box. |
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 a specific level of the chart hierarchy. |
Description | String | RW | Description (default = '') of this state. Equivalent to entering a description in the Description field of the Chart properties dialog box. |
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 box. |
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 box. |
EnableNonTerminalStates | Boolean | RW | If set to true (default = false), enables super step semantics for the chart, as described in Execution of 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 color for errors in your chart by using a 1-by-3 RGB array (default = [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 box 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 box. |
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 box. |
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 a Single Chart. |
JunctionColor | [R,G,B] | RW | Set the color for junctions in your chart by using a 1-by-3 RGB array (default = [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 box 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 box. |
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 Execution of 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 Execution of 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 box). |
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 box 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 box 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 box 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 box 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 box 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 box 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 box 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 box. |
SupportVariableSizing | Boolean | RW | If set to true (default), support chart input and output data that vary in dimension during simulation. Equivalent to selecting the Support variable-size arrays check box in the Chart properties dialog box. |
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 color for transitions in your chart by using 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 box 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 box 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 box 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 box 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 box 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 box 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 box. |
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 box. | |
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 Simulink function for a parent chart or state. | |
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 box. |
Description | String | RW | Description of this data (default = ''). Equivalent to entering a description in the Description field of the Data properties dialog box. |
Document | String | RW | Document link to this data (default = ''). Equivalent to entering a link in the Document link field of the Data properties dialog box. |
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 box. |
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 box. |
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 box. |
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 box. |
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 box. |
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 box. |
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 box. |
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 box. |
Props. | String | RW | The bias value for fixed-point data (default = 0.0) when Props.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 box. |
Props. | String | RW | The location of the binary point in fixed-point data (default = 0) when 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 box. |
Props. | Integer | RW | If set to 1 (default = 0), prevents Simulink software from replacing the current fixed-point type with a type that the Fixed-Point Tool or Fixed-Point Advisor chooses. Equivalent to selecting Lock data type setting against changes by the fixed-point tools in the Data properties dialog box. |
Props. | String | RW | Method for scaling fixed point data to avoid overflow conditions and minimize quantization errors. The settings are:
Equivalent to setting the Scaling field of the Data Type Assistant in the Data properties dialog box. |
Props. | String | RW | The slope value for fixed-point data (default = 1.0) when Props.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 box. |
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 box. |
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 box. |
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 box. |
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 Save final value to base workspace check box in the Data properties dialog box. |
Scope | Enum | RW | Scope of this data:
Equivalent to setting the Scope field in the Data properties dialog box. 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 box. |
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 box. | |
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 box. |
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). |
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 box 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 box 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 box 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 box. |
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 box. |
Description | String | RW | Description of this event (default = ''). Equivalent to entering a description in the Description field in the Event properties dialog box. |
Document | String | RW | Document link to this event (default = ''). Equivalent to entering the Document Link field in the Event properties dialog box. |
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 box. |
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 box. 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 box. | |
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 box. |
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). |
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 box 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 box 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 box 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 | String | RW | Determine how generated code for this graphical function appears. Possible settings are:
|
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 box 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 box. |
Document | String | RW | Document link to this junction (default = ''). Equivalent to entering the Document Link field of the Junction properties dialog box. |
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 box. | |
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 box 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 box 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 box 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 box. |
Document | String | RW | Document link to this note (default = ''). Equivalent to entering a link in the Document Link field of the Note properties dialog box. |
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 'TEX'. |
Machine | Machine | RO | Machine that contains this note. |
Position | Rect | RW | Position and size of this note's box in the Stateflow chart, given in the form of a 1-by-4 array (default is [0 0 25 25]) consisting of the following:
|
Subviewer | Chart or State | RO | State or chart in which this note can be graphically viewed. |
Tag | Any Type | RW | Holds data of any type (default = []) for this note. |
Text | String | RW | Label for this note (default = '?'). The text content for this note that you enter directly into the note in the Stateflow Editor or in the Label field of the Note properties dialog box. |
Note objects have the methods in the table below. For details on each method, see API Method Reference.
See also Note Properties.
Method | Description |
|---|---|
Delete this note from the Stateflow chart. | |
Display the Note properties dialog box. | |
Display the property names and their settings for this Note object. | |
Zoom in on this note and highlight it in the Stateflow Editor. | |
Return the specified property settings for this note. | |
Display a list of properties for this Note object with short descriptions. | |
Display all nonglobal methods of this Note object. | |
Set the specified property of this Note object with the specified value. | |
Return and display a MATLAB structure containing the property settings of this Note object. | |
Display this note's chart in the Stateflow Editor with this note highlighted. |
The Root object has the methods in the table below. For details on each method, see API Method Reference.
Method | Description |
|---|---|
Find all objects that this Root object contains that meet the specified criteria. | |
Return the specified property settings for the Root object. | |
Display a list of properties for the Root object with short descriptions. | |
Display all nonglobal methods of this Root object. | |
Set the specified property of this Root object with the specified value. | |
Return and display a MATLAB structure containing the property settings of this Root object. |
Stateflow API objects of type Simulink Function have the properties shown below. See also Simulink Function Methods.
Property | Type | Access | Description |
|---|---|---|---|
ArrowSize | Double | RW | Size of transition arrows coming into this Simulink function (default = 8). |
BadIntersection | Boolean | RO | If true, this function graphically intersects a state, box, Embedded MATLAB function, graphical function, truth table, or another Simulink function. |
Chart | Chart | RO | Chart object containing this function. |
Description | String | RW | Description of this function (default = ''). |
Document | String | RW | Document link to this note. |
FontSize | Double | RW | Size of the font (default = 12) 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 Simulink function. |
Id | Integer | RO | Unique identifier assigned to this function to distinguish it from other objects in the model. |
LabelString | String | RW | Label for this function. 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 = 'simfcn'). Equivalent to typing the name of this function in its label text field in the Stateflow Editor. |
Position | Rect | RW | Position and size of this function box in the Stateflow chart, given in the form of a 1-by-4 array (default is [0 0 90 60]) that consists of the following:
|
Subviewer | Chart | RO | Chart in which this function can be graphically viewed. |
Tag | Any Type | RW | A field you can use to hold data of any type for this function. |
Simulink Function objects have the methods in the table below. For details on each method, see API Method Reference.
See also Simulink Function Properties.
Method | Description |
|---|---|
Delete this function from the Stateflow chart. | |
Display the property names and their settings for this Simulink Function object. | |
Find all objects that this Simulink function contains that meet the specified criteria. | |
Zoom in on this Simulink function and highlight it in the Stateflow Editor. | |
Return the specified property settings for this function. | |
Display a list of properties for this Simulink Function object with short descriptions. | |
Display all nonglobal methods of this Simulink Function object. | |
Set the specified property of this Simulink Function object with the specified value. | |
Return and display a MATLAB structure containing the property settings of this Simulink Function object. | |
Display the contents of the subsystem inside this Simulink function. |
Stateflow API objects of type State have the properties shown below. See also State Methods.
Property | Type | Access | 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, Embedded MATLAB function, graphical function, truth table, or another state. |
Chart | Chart | RO | Chart object containing this state. |
Debug. | Boolean | RW | If set to true (default = false), set the state during breakpoint for this chart. Equivalent to selecting the State During check box in the State properties dialog box. |
Debug. | 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 State properties dialog box. |
Debug. | Boolean | RW | If set to true (default = false), set the state exit breakpoint for this chart. Equivalent to selecting the State Exit check box in the State properties dialog box. |
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 State properties dialog box. |
Document | String | RW | Document link to this state (default = ''). Equivalent to entering a link in the Document Link field of the State properties dialog box. |
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. Equivalent to selecting the Output State Activity check box in the State properties dialog box. |
Id | Integer | RO | Unique identifier assigned to this state to distinguish it from other objects in the model. |
InlineOption | String | RW | Determine how generated code for this state appears. Possible settings are:
For guidelines on controlling inlining of state functions, see Controlling Inlining of State Functions in Generated Code in the Stateflow and Stateflow Coder User's Guide. |
IsGrouped | Boolean | RW | If set to true (default = false), group this state. Nothing can 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. |
LabelString | String | RW | Label for this state (default = '?'). Equivalent to typing the label for this state in its label text field in the Stateflow 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 Stateflow 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 | Chart or state in which you can graphically view this state. |
Tag | Any Type | RW | Holds data of any type (default = []) for this state. |
TestPoint | Integer | RW | If set to 1 (default = 0), sets this state as a Stateflow test point. See Monitoring Test Points in Stateflow Charts in the Stateflow and Stateflow Coder User's Guide. |
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. |
State objects have the methods in the table below. For details on each method, see API Method Reference.
See also State Properties.
Method | Description |
|---|---|
Return the default transitions in this state at the top level of containment. | |
Delete this state. | |
Display the State properties dialog box. | |
Display the property names and their settings for this State object. | |
Find all objects that this state contains that meet the specified criteria. | |
Zoom in on this state and highlight it in the Stateflow Editor. | |
Return the specified property settings for this state. | |
Display a list of properties for this State object with short descriptions. | |
Return the inner transitions that originate with this state and terminate on a contained object. | |
Display all nonglobal methods of this State object. | |
Return an array of transitions that exit the outer edge of this state and terminate on an object outside the containment of this state. | |
Output the activity status of this state to the Simulink base workspace via a data output port on the Stateflow block of this state. | |
Set the specified property of this State object with the specified value. | |
Return all inner and outer transitions whose source is this state. | |
Return and display a MATLAB structure containing the property settings of this State object. | |
Display this state's chart in the Stateflow Editor with this state highlighted. |
Stateflow API objects of type Target have the properties shown below. See also Target Methods.
Property | Type | Access | Description |
|---|---|---|---|
ApplyToAllLibs | Boolean | RW | If set to true (default), use settings in this custom target for all libraries. Equivalent to selecting the Use these custom code settings for all libraries check box in the Custom Target dialog box. |
CodeFlagsInfo | Array | RO | A MATLAB vector of structures containing information on the code flag settings for this custom target. See CodeFlagsInfo Property of Targets for more information. |
CodegenDirectory | String | RW | Folder to store generated code for a custom target (default = ''). Equivalent to the entry in the Generated Code Directory field of the Custom Target dialog box. |
CustomCode | String | RW | Custom code included at the top of the generated header file for a custom target (default = ''). Equivalent to the entry in the Include Code field of the Custom Target dialog box. |
Description | String | RW | Description of this custom target (default = ''). Equivalent to entering a description in the Description field of the Custom Target dialog box. |
Document | String | RW | Document link to this custom target (default = ''). Equivalent to entering the Document Link field of the Custom Target dialog box. |
Id | Integer | RO | Unique identifier assigned to this Target object to distinguish it from other objects loaded in memory. |
Machine | Machine | RO | Stateflow machine containing this custom target. |
Name | String | RW | Name of this custom target (default = 'untitled'). Equivalent to naming or renaming this target in the Model Explorer. |
ReservedNames | String | RW | Comma- or space-separated list of names to not use in Stateflow generated code for a custom target. Equivalent to the entry in the Reserved Names field of the Custom Target dialog box. |
Tag | Any Type | RW | Holds data of any type (default = []) for this target. |
UserIncludeDirs | String | RW | Space-separated list of custom include folder paths for a custom target (default = ''). Equivalent to the entry in the Include Paths field of the Custom Target dialog box. |
UserLibraries | String | RW | Space-separated list of custom libraries for a custom target (default = ''). Equivalent to the entry in the Libraries field of the Custom Target dialog box. |
UserSources | String | RW | Space-separated list of custom source files for a custom target (default = ''). Equivalent to the entry in the Source Files field of the Custom Target dialog box. |
The CodeFlagsInfo property of a Target object is a read-only MATLAB vector of structures containing information on the code flag settings for a custom target. Each element in the vector has the following MATLAB structure of information about a particular code flag:
Element | Type | Description |
|---|---|---|
name | String | Short name for this flag |
type | String | The type of the code flag |
description | String | A description of this code flag |
defaultValue | Boolean | The default value of this code flag upon creation of its target |
visible | Boolean | Whether or not this flag is visible |
enable | Boolean | Whether or not to enable this flag |
value | Boolean | The value of the flag |
The first element of each structure is a shorthand name for the individual flag that you set in the Custom Target dialog box. For example, the name 'comments' actually refers to the dialog box setting User Comments in generated code. While the CodeFlagsInfo property is informational only, you can use these shorthand flag names in the methods getCodeFlag and setCodeFlag to access and change the values of a flag. (See API Method Reference for more information.)
The names of possible code flags in the CodeFlagsInfo property and the name of the flag as it appears in the General pane of the Custom Target dialog box are as follows:
Name in CodeFlagsInfo | Name in Custom Target Dialog Box | Default Value |
|---|---|---|
comments | User Comments in generated code | Enabled |
autocomments | Auto-generated Comments in generated code | Disabled |
emitdescriptions | State/Transition Descriptions in generated code | Enabled |
statebitsets | Use bitsets for storing state configuration | Enabled |
databitsets | Use bitsets for storing boolean data | Enabled |
emitlogicalops | Compact nested if-else using logical AND/OR operators | Enabled |
elseifdetection | Recognize if-elseif-else in nested if-else statements | Enabled |
constantfolding | Replace constant expressions by a single constant | Enabled |
redundantloadelimination | Minimize array reads using temporary variables | Disabled |
exportcharts | Use chart names with no mangling | Disabled |
ioformat | I/O data format: Can be one of these values:
| 0 |
initializer | Generate chart initializer function | Disabled |
multiinstanced | Multi-instance capable code | Disabled |
Target objects have the methods in the table below. For details on each method, see API Method Reference.
See also Target Properties.
Method | Description |
|---|---|
Build this custom target incrementally only for those portions of the target's charts that have changed since the last build. | |
Delete this custom target. | |
Display the Custom Target dialog box. | |
Display the property names and their settings for this Target object. | |
Return the specified property settings for this custom target. | |
Return the value of the specified code flag for this custom target. | |
Display a list of properties for this Target object with short descriptions. | |
Compile this custom target incrementally only for those portions of generated code that have changed since the last compilation. | |
Display all nonglobal methods of this Target object. | |
Completely rebuild this custom target. | |
Completely regenerate code for this custom target. | |
Set the specified property of this Target object with the specified value. | |
Set the specified code flag for this custom target with the specified value. | |
Return and display a MATLAB structure containing the property settings of this Target object. | |
Display this custom target in the Model Explorer. |
Stateflow API objects of type Transition have the properties shown below. See also Transition Methods.
Property | Type | Access | Description |
|---|---|---|---|
ArrowSize | Double | RW | Size of the arrow (default = 10) for this transition. |
Chart | Chart | RO | Stateflow chart object containing this transition. |
Debug. | Boolean | RW | If set to true (default = false), set a debugging breakpoint to occur when this transition is tested to see whether it is a valid transition or not. Equivalent to selecting the When Tested check box in the properties dialog box of this transition. |
Debug. | Boolean | RW | If set to true (default = false), set a debugging breakpoint to occur when this transition has tested as valid. Equivalent to selecting the When Valid check box in the properties dialog box of this transition. |
Description | String | RW | Description of this transition (default = ''). Equivalent to entering a description in the Description field of the properties dialog box for this transition. |
Destination | State or Junction | RW | Destination state or junction (default = []) of this transition. Assign Destination the destination object for this transition. You can also use the property Destination to detach the destination end of a transition, through the command t.Destination = [] where t is the Transition object. |
DestinationOClock | Double | RW | Location of transition destination connection on state (default = 0). Varies from 0 to 12 for full clock cycle location. Its value is taken as modulus 12 of its assigned value. |
Document | String | RW | Document link to this transition (default = ''). Equivalent to entering the Document Link field of the properties dialog box for this transition. |
DrawStyle | Enum | RW | Drawing style for this transition. Set to 'SMART' (default) for smart transitions or 'STATIC' for static transitions. Equivalent to selecting Smart from the context menu for this transition to toggle between settings. |
ExecutionOrder | Integer | RW | Specifies the number for this transition in the execution order for its source (see Evaluation Order for Outgoing Transitions in the Stateflow and Stateflow Coder User's Guide). The UserSpecifiedStateTransitionExecutionOrder property of the parent chart has to be set to true, otherwise, this transition property will be ignored. ExecutionOrder has to be an integer between 1 and m, where m is the total number of transitions originating from the source. |
FontSize | Double | RW | Size of the font (default = 12) for the label text for this box. This property overrides the default size for this box, which is set by the TransitionFont.Size property of the Chart object containing this box. Equivalent to selecting Font Size > <font size> in the context menu for this box. |
Id | Integer | RO | Unique identifier assigned to this transition to distinguish it from other objects in the model. |
LabelPosition | Rect | RW | Position and size of this note's box in the Stateflow chart, given in the form of a 1-by-4 array (default is [0 0 8 14]) consisting of the following:
|
LabelString | String | RW | Label for this transition (default = '?'). Equivalent to typing the label for this transition in its label text field in the Stateflow Editor. |
Machine | Machine | RO | Machine containing this transition. |
MidPoint | Rect | RW | Position of the midpoint of this transition relative to the upper left corner of the Stateflow Editor workspace in an [x y] point array (default = [0 0]). |
Source | State or Junction | RW | Source state or junction of this transition (default = []). Assign Source the source object for this transition. You can also use the property Source to detach the source end of a transition, through the command t.Source = [] where t is the Transition object. |
SourceEndPoint | Rect | RO* | [x y] spatial coordinates for the endpoint of a transition (default = [2 2]). This property is RW (read/write) only for default transitions. For all other transitions it is RO (read-only). |
SourceOClock | Double | RW | Location of transition source connection on state (default = 0). Varies from 0 to 12 for full clock cycle location. The value taken for this property is the modulus 12 of the entered value. |
Subviewer | Chart or State | RO | State or chart in which this transition can be graphically viewed. |
Tag | Any Type | RW | Holds data of any type (default = []) for this transition. |
Transition objects have the methods in the table below. For details on each method, see API Method Reference.
See also Transition Properties.
Method | Description |
|---|---|
Delete this transition from the Stateflow chart. | |
Display the properties dialog box of this transition. | |
Display the property names and their settings for this Transition object. | |
Zoom in on this transition and highlight it in the Stateflow Editor. | |
Return the specified property settings for this transition. | |
Display a list of properties for this Transition object with short descriptions. | |
Display all nonglobal methods of this Transition object. | |
Set the specified property of this Transition object with the specified value. | |
Return and display a MATLAB structure containing the property settings of this Transition object. | |
Display this transition's chart in the Stateflow Editor with this transition highlighted. |
Stateflow API objects of type TruthTable have the properties shown below. See also Truth Table Methods.
Property | Type | Access | Description |
|---|---|---|---|
ActionTable | Cell Array | RW | A cell array of strings containing the contents of the Action Table for this truth table. |
ArrowSize | Double | RW | Size of transition arrows coming into the truth table function in the Stateflow chart (default = 8). |
BadIntersection | Boolean | RO | If true, this truth table graphically intersects a state, box, Embedded MATLAB function, graphical function, or another truth table. |
Chart | Chart | RO | Chart object containing this truth table. |
ConditionTable | Cell Array | RW | A cell array of strings containing the contents of the Condition Table for this truth table, including the Actions row. |
Debug. | Boolean | RW | If true, sets the during breakpoint for this truth table. Equivalent to selecting the Function Call check box in the Truth Table properties dialog box. |
Description | String | RW | Description of this truth table (default = ''). Equivalent to entering a description in the Description field of the Truth Table properties dialog box. |
Document | String | RW | Document link to this truth table. Equivalent to entering a link in the Document Link field of the Truth Table properties dialog box. |
FontSize | Double | RW | Size of the (default = 12) font of the label text for this truth table. This property overrides the font size set for this truth table 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 truth table. |
Id | Integer | RO | Unique identifier assigned to this truth table to distinguish it from other objects in the model. |
LabelString | String | RW | Full label for this truth table (default = '()') including its return, name, and arguments. Equivalent to typing the label for this truth table in its label text field in the Stateflow Editor. |
Machine | Machine | RO | Machine that contains this truth table. |
Name | String | RW | Name of this truth table (default = ''). Equivalent to typing a name for this truth table into the label text field of the truth table box in the Stateflow Editor. Label syntax is return = Name (arguments). |
OverSpecDiagnostic | String | RW | Interprets the error diagnosis of this truth table as overspecified according to the possible values 'Error', 'Warning', or 'None'. In the Truth Table Editor, the value of this property is assigned by selecting Overspecified from the Diagnostics menu item and then selecting one of the three values. |
Position | Rect | RW | Position and size of this truth table'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 truth table can be graphically viewed. |
Tag | Any Type | RW | Holds data of any type (default = []) for this truth table. |
UnderSpecDiagnostic | String | RW | Interprets the error diagnosis of this truth table as underspecified according to the possible values 'Error', 'Warning', or 'None'. In the Truth Table Editor, the value of this property is assigned by selecting Underspecified from the Diagnostics menu item and then selecting one of the three values. |
Truth table objects have the methods in the table below. For details on each method, see API Method Reference.
See also Truth Table Properties.
Method | Description |
|---|---|
Delete this truth table from the Stateflow chart. | |
Display the Truth Table properties dialog box. | |
Display the property names and their settings for this truth table object. | |
Find all objects that this graphical truth table contains that meet the specified criteria. | |
Zoom in on this truth table and highlight it in the Stateflow Editor. | |
Return the specified property settings for this truth table. | |
Display a list of properties for this truth table object with short descriptions. | |
Display all nonglobal methods of this truth table object. | |
Set the specified property of this truth table object with the specified value. | |
Return and display a MATLAB structure containing the property settings of this truth table object. | |
Display this truth table's chart in the Stateflow Editor with this truth table highlighted. |
Stateflow API objects of type TruthTableChart have the properties shown below. See also Truth Table Chart Methods.
Property | Type | Access | Description |
|---|---|---|---|
ActionTable | Cell Array | RW | A cell array of strings containing the contents of the Action Table for this truth table block. |
| ChartUpdate | Enum | RW | Activation method of this chart. Can be 'INHERITED' (default), 'DISCRETE', or 'CONTINUOUS'. |
ConditionTable | Cell Array | RW | A cell array of strings containing the contents of the Condition Table for this truth table block, including the Actions row. |
Description | String | RW | Description of this truth table block (default = ''). Equivalent to entering a description in the Description field of the properties dialog box for this truth table block. |
| Dirty | Boolean | RW | If set to true (default = false), this chart has changed since being opened or saved. |
Document | String | RW | Document link to this truth table block. |
| Iced | Boolean | RO | Equivalent to property Locked (default = false) except that this property is used internally to lock this block from change during activities such as simulation. |
Id | Integer | RO | Unique identifier assigned to this truth table block to distinguish it from other objects in the model. |
| InputFimath | embedded.fimath object | RW | The embedded.fimath object that will be associated with inputs from Simulink blocks. |
LabelString | String | RW | Full label for this truth table (default = '()') including its return, name, and arguments. Equivalent to typing the label for this truth table in its label text field in the Stateflow Editor. |
| Locked | Boolean | RW | If set to true (default = false), mark this block as read-only and prohibit any write operations on it. |
Machine | Machine | RO | Machine that contains this truth table block. |
Name | String | RW | Name of this truth table block. (default = ''). Equivalent to typing a name for this truth table into the label text field of the truth table box in the Stateflow Editor. Label syntax is return = Name (arguments). |
OverSpecDiagnostic | String | RW | Interprets the error diagnosis of this truth table as overspecified according to the possible values 'Error', 'Warning', or 'None'. In the Truth Table Editor, the value of this property is assigned by selecting Overspecified from the Settings menu item and then selecting one of the three values. |
Path | String | RW | Path to the block. |
| SampleTime | String | RW | Sample time for activating this chart (default = ' '). |
Tag | Any Type | RW | Holds data of any type (default = []) for this truth table block. |
| TreatInheritedIntegersAs | String | RW | Determines how inherited integer signals are treated in Embedded MATLAB functions. The two choices are Integers and Fixed-point. A Simulink model does not distinguish between a fixed-point signal with zero fraction length and an integer signal. However, the MATLAB workspace has two different classes for these two kinds of data: Integers (uint8, int16, etc...) and embedded.fi. You can specify the type for any given input signal to be either Integer or fixed-point and override this default. |
UnderSpecDiagnostic | String | RW | Interprets the error diagnosis of this truth table as underspecified according to the possible values 'Error', 'Warning', or 'None'. In the Truth Table Editor, the value of this property is assigned by selecting Underspecified from the Settings menu item and then selecting one of the three values. |
Truth Table Chart objects have the methods in the table below. For details on each method, see API Method Reference.
See also Truth Table Chart Properties.
Method | Description |
|---|---|
| Return the default transitions in this object at the top level of containment. | |
Delete this truth table from the Stateflow chart. | |
Display the properties dialog box of this truth table. | |
Display the property names and their settings for this truth table object. | |
Find all objects that this graphical truth table contains that meet the specified criteria. | |
Return the specified property settings for this truth table. | |
Display a list of properties for this truth table object with short descriptions. | |
Display all nonglobal methods of this truth table object. | |
Set the specified property of this truth table object with the specified value. | |
Return and display a MATLAB structure containing the property settings of this truth table object. | |
Display this truth table's chart in the Stateflow Editor with this truth table highlighted. |
![]() | Creating a MATLAB Script of API Commands | API Object Properties and Methods | ![]() |

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |