| Contents | Index |
Use enumerated data in a Stateflow chart to:
Model a physical system with a finite number of states
Restrict data to a finite set of values
Refer to these values by name
For example, this chart uses enumerated data to refer to a set of colors.

The chart models a system with two discrete states: Slow and Fast.
The enumerated data output is restricted to a finite set of values: 0, 1, and 2.
You can refer to these values by their enumerated names: Red, Yellow, and Green.
In large-scale models, use enumerated data for these benefits:
Enhance readability of data in a chart.
Avoid defining a long list of constants.
For example, you can group related values into separate data types.
![]() | What Is Enumerated Data? | Where to Use Enumerated Data | ![]() |

Learn how engineers use Stateflow to model state machines in their Simulink models.
| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |