Stateflow | ![]() ![]() |
What Is the Stateflow API?
The Stateflow Application Programming Interface (API) is a tool of convenience that lets you create or change Stateflow diagrams with MATLAB commands. By placing Stateflow API commands in a MATLAB script, you can automate Stateflow diagram editing processes in a single command.
There are many possible applications for the Stateflow API. Here are some:
The Stateflow API consists of objects that represent actual Stateflow objects. For example, an API object of type State represents a Stateflow state, an API object of type Junction represents a Stateflow junction, and so on.
Each API object has methods and properties you use to perform editing operations on it. The correspondence between API object and Stateflow object is so close that what you do to a Stateflow API object affects the object it represents in the Stateflow diagram editor, and what you do to a graphical object in the Stateflow diagram editor affects the Stateflow API object that represents it.
The following topics introduce you to the objects, properties, and methods of the Stateflow API.
![]() | Overview of the Stateflow API | Stateflow API Object Hierarchy | ![]() |