Skip to Main Content Skip to Search
Product Documentation

How to View Enumerated Values in a Stateflow Chart

Viewing Values of Enumerated Data During Simulation

To view the values of enumerated data during simulation:

  1. Open the Stateflow Debugger.

  2. In the Stateflow Debugger, select breakpoints.

  3. Click Start to simulate the model.

  4. During simulation, select Browse Data.

    In the Stateflow Debugger, the values of enumerated data appear by name. (For more information, see Watching Data in the Stateflow Debugger.)

Viewing Values of Enumerated Data After Simulation

To view the values of enumerated data after simulation:

  1. Open the Model Explorer.

  2. In the Model Hierarchy pane, select a chart with enumerated data.

  3. In the Contents pane, right-click an enumerated data and select Properties.

    The Data properties dialog box appears.

  4. In the Description pane, select Save final value to base workspace.

  5. Click OK to close the Data properties dialog box.

  6. Repeat steps 2 through 5 if you want to save the final value of another enumerated data.

  7. Simulate the model.

  8. 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.

  


Free Stateflow Interactive Kit

Learn how engineers use Stateflow to model state machines in their Simulink models.


Get free kit

Trials Available

Try the latest version of Stateflow.


Get trial software
 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS