| Stateflow User's Guide |
Use this example index to jump to code examples in the documentation.
Creating a Simulink Model with a Stateflow Block
Drawing States in Stateflow Diagrams
Adding a Trigger Event to the Stateflow Diagram
Setting Up Diagram Simulation
Using the Debug Tool During Simulation
Stateflow Diagram Objects
States
Transitions
Default Transitions
Conditions
History Junction
Actions
Connective Junctions
Control Logic of the "fuel rate controller" Model
Overview of the "fuel rate controller" Model
Simulating the "fuel rate controller" Model
Implicit Event Broadcasts
Stateflow Hierarchy of Objects
Representing State Hierarchy Example
Transition Hierarchy
Exclusive (OR) State Decomposition
Parallel (AND) State Decomposition
Transitions to and from Exclusive (OR) States
Transitions to and from Junctions
Transitions to and from Exclusive (OR) Superstates
Self-Loop Transitions
Transitions to and from Substates
Before Using an Inner Transition
After Using an Inner Transition to a Connective Junction
Using an Inner Transition to a History Junction
Processing One Event in an Exclusive (OR) State
Processing a Second Event in an Exclusive (OR) State
Processing a Third Event in an Exclusive (OR) State
Processing the First Event with an Inner Transition to a Connective Junction
Processing a Second Event with an Inner Transition to a Connective Junction
Inner Transition to a History Junction Example
Default Transition to a Junction Example
Default Transition with a Label Example
Default Transition in Exclusive (OR) Decomposition Example
Default Transition to a Junction Example
Default Transition and a History Junction Example
Labeled Default Transitions Example
Use of History Junctions Example
Connective Junction with All Conditions Specified Example
Connective Junction with One Unconditional Transition Example
Connective Junction--Self-Loop Example
Connective Junction and For Loops Example
Flow Diagram Notation Example
Connective Junction from a Common Source to Multiple Destinations Example
Connective Junction Common Events Example
Label Format for Transition Segments Example
If-Then-Else Decision Construct Example
Self-Loop Transition Example
For Loop Construct Example
Flow Diagram Notation Example
Transitions from a Common Source to Multiple Destinations Example
Transitions from Multiple Sources to a Common Destination Example
Transitions from a Source to a Destination Based on a Common Event Example
Backtracking Behavior in Flow Graphs Example
Early Return Logic for Event Broadcasts
Transitioning from State to State with Events Example
Transitioning from a Substate to a Substate with Events Example
Condition Action Example
Condition and Transition Actions Example
Condition Actions in For Loop Construct Example
Condition Actions to Broadcast Events to Parallel (AND) States Example
Cyclic Behavior to Avoid with Condition Actions Example
Event Actions in a Superstate Example
Event Broadcast State Action Example
Event Broadcast Transition Action with a Nested Event Broadcast Example
Event Broadcast Condition Action Example
Directed Event Broadcast Using send Example
Directed Event Broadcasting Using Qualified Event Names Example
Creating Self-Loop Transitions
Stateflow Diagram Editor Window
Using the Colors & Fonts Dialog
What Is a Supertransition?
Drawing a Supertransition Out of a Subchart
Drawing a Supertransition Into a Subchart
Nonsmart Transitions Anchor Connection Points
Nonsmart Transitions Distort Asymmetrically
Smart Transitions Slide Around Surfaces
Smart Transitions Slide and Maintain Shape
Smart Transitions Connect States to Junctions at 90 Degree Angles
Smart Transitions Snap to an Invisible Grid
Smart Transitions Bow Symmetrically
Creating a Function
Calling Functions in Stateflow
Adding Events in the Model Explorer
Adding Data in the Model Explorer
Sharing Input and Output Data with Simulink
Array Notation
Using Data and Event Arguments in Actions
Event Broadcast State Action Example
Event Broadcast Transition Action Example
Directed Event Broadcasting Using send
Directed Event Broadcasting Using Qualified Event Names
Symbol Autocreation Wizard
Inferring Return Size for ml Expressions
ml Data Type
Which ml Should I Use?
ml Expressions
ml Function
ml Namespace Operator
Function Call Transition Action Example
Function Call State Action Example
Temporal Logic Events
every Temporal Logic Operator
at Temporal Logic Operator
before Temporal Logic Operator
after Temporal Logic Operator
Rules for Using Temporal Logic Operators
Fixed-Point "Bang-Bang Control" Example
Relational Operations (>, <, >=, <=, ==, -=, !=, <>).
:= Multiplication Example
:= Division Example
Offline and Online Conversion Examples
Triggered Stateflow Block Example
Sampled Stateflow Block Example
Inherited Stateflow Block Example
Continuous Stateflow Block Example
Function Call Output Events Example
Function Call Semantics Example
Edge-Triggered Semantics Example
Exported Event Example
Imported Event Example
Exported Data Example
Imported Data Example
Debugging Run-Time Errors Example
State Inconsistency Example
Conflicting Transition Example
Data Range Violation Example
Cyclic Behavior Example
Flow Cyclic Behavior Not Detected Example
Noncyclic Behavior Flagged as a Cyclic Example
Summary Report Section
Chart as Subsystem Details Report Section
Chart as Superstate Details Report Section
State Details Report Section
Transition Details Report Section
MCDC Coverage
Condition Coverage
Superstate Containing Exclusive OR Substates Decision
Searching with Regular Expression Tokens
Replacing with Case Preservation
Replacing with Tokens
Create a New Model and Chart
Getting and Setting the Properties of Objects
Finding Objects at Different Levels of Containment
Finding Objects
Creating Stateflow Objects
Displaying Enumerated Values for Properties
Displaying Property Subproperties
Displaying the Names of Methods
Displaying Properties
Using Function Notation with Methods
Using Dot Notation with Properties and Methods
Create New Objects in the Chart
Access the Chart Object
Creating a MATLAB Script of API Commands
Creating Default Transitions
Entering Multiline Labels
Using the Editor Object
Accessing the Editor Object
Copying Objects Individually
Copying by Grouping (Recommended)