Stateflow® provides a graphical language that includes state transition diagrams, flow charts, state transition tables, and truth tables. Use Stateflow to describe how MATLAB® algorithms and Simulink® models react to input signals, events, and time-based conditions.
Design and develop supervisory control, task scheduling, fault management, communication protocols, user interfaces, and hybrid systems.
Model combinatorial and sequential decision logic that can be simulated as a block within a Simulink model or executed as an object in MATLAB. Use graphical animation for analyzing and debugging your logic while it is executing. Edit-time and run-time checks ensure design consistency and completeness before implementation.
State flow simplifies designing systems that contain complex logic or switch between multiple modes of operation by leveraging state diagrams, flowcharts, and truth tables. State flow is used to develop applications such as supervisory control and task scheduling, fault management, test and measurement and interface logic, and communication protocols. A single chart can represent an entire specification document, but these diagrams aren't just static pictures. State flow charts are blocks in a Simulink model. Just clicked the run button and see that they are part of a larger modeling and simulation environment. That enables you to simulate and evaluate your designs performance and behavior.
State flow animation and graphical debugging enables you to examine how your design transitions between states. You can review how your scenario unfolded with diagnostic tools like the sequence viewer. You can link your design directly to requirements, check that it complies with industry standards, and collect coverage metrics ensuring everything is working correctly. Once you verified and validated your designs behavior you can automatically generate C, C++, HDL, and PLC code. This lets you leverage your work directly on implementation platforms without writing thousands of lines of code by hand.
Similarly, you can automate the creation of the documentation that accompanies your design. If you develop MATLAB applications without using Simulink models you can still use state flows to simplify your designs. In MATLAB, state flow charts are represented as objects that you can use to program robots or anywhere timing is important. The same chart can represent the logic for multiple objects. This makes it simple to change the number of objects in the scenario.
To learn more or start a trial please refer to the state flow product page.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .Select web site
You can also select a web site from the following list:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.