Use this example index to jump to code examples in the documentation.
Create a Simulink Model
Define Input Events
Create a Stateflow Diagram
Define the Stateflow Interface
Run a Simulation
Where Stateflow Generates Code for Simulation
Parse the Stateflow Diagram
Define Simulink Parameters
Save the Model
Debug the Model During Simulation
Graphical Objects Example Diagram
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
Representing Transition Hierarchy Example
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
Action Language Categories Example
Typecast Operations
Types of Action Language
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
Stateflow Diagram Editor Window
Drawing Objects
Using the Colors & Fonts Dialog
Creating Self-Loop Transitions
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
Calling Graphical Functions
Creating a Graphical Function
What Is a Supertransition?
Drawing a Transition Into a Subchart
Drawing a Transition Out of a Subchart
Using the Explorer to Define Events
Defining Data Arrays
Using the Explorer to Add Data
Defining Input Data
Defining Output Data
Array Notation
Data and Event Arguments
Event Broadcast State Action Example
Event Broadcast Transition Action Example
Directed Event Broadcast Using send Example
Directed Event Broadcast Using Qualified Event Names Example
Symbol Autocreation Wizard
Offline and Online Conversion Examples
Relational Operations (>, <, >=, <=, ==, -=, !=, <>).
:= Multiplication Example
:= Division Example
Fixed-Point "Bang-Bang Control" Example
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
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
Transferring Properties Between Objects
Searching with Regular Expression Tokens
Replacing with Case Preservation
Replacing with Tokens
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
MCDC Coverage
Condition Coverage
Superstate Containing Exclusive OR Substates Decision
Transition Report Section
State Report Section
Chart as Superstate Report Section
Chart as Subsystem Report Section
Create a New Model and Chart
Create New Objects in the Chart
Access the Chart Object
Copying Objects Individually
Copying by Grouping (Recommended)
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 the Names of Properties
Using Function Notation with Methods
Using Dot Notation with Properties and Methods
Creating a MATLAB Script of API Commands
Creating Default Transitions
Entering Multiline Labels
Using the Editor Object
Accessing the Editor Object