|On this page…|
To view the values of enumerated data during simulation:
Open the Stateflow® Debugger.
In the Stateflow Debugger, select breakpoints.
Click Start to simulate the model.
During simulation, select Browse Data.
In the Stateflow Debugger, the values of enumerated data appear by name. (For more information, see Watch Data in the Stateflow Debugger.)
To view the values of enumerated data after simulation:
Open the Model Explorer.
In the Model Hierarchy pane, select a chart with enumerated data.
In the Contents pane, right-click an enumerated data and select Properties.
The Data properties dialog box appears.
In the Description pane, select Save final value to base workspace.
Click OK to close the Data properties dialog box.
Repeat steps 2 through 5 if you want to save the final value of another enumerated data.
Simulate the model.
After simulation ends, view enumerated data in the base workspace.
In the MATLAB® Command Window, the final values of enumerated data appear by underlying numeric value.