- Open the Stateflow chart in Simulink.
- Double-click on the Stateflow block to enter the Stateflow Editor.
- In the Stateflow Editor, you can click and drag the states to change their positions in the chart. Dragging a state up or down will change its order in the Data Inspector.
- Rearrange the states according to your preferred order.
- Save the Stateflow chart and run the simulation again.
- Once the simulation is complete, open the Data Inspector to view the reordered state labels.
Stateflow states ordering in Data Inspector
4 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
When you use a Stateflow chart within Simulink framework, there is the possibility to log the active state. Then, once the simulation has been completed, you can see the results using the Data Inspector. The logged states are plotted along the y-axis, versus time on the x-axis.
I am wondering if there is the possibility to re-order the state labels along the y axis, i. e. to specify which ones are showed on the top and which ones on the bottom. I found out that the default ordering is not always the most useful
0 Commenti
Risposta accettata
Atharva
il 21 Giu 2023
Hey Federico,
In Simulink, the Stateflow chart provides a way to log the active states during simulation and view the results using the Data Inspector. By default, the logged states are plotted along the y-axis in the order of their appearance in the Stateflow chart. However, it is not possible to directly reorder the state labels along the y-axis in the Data Inspector.
To change the ordering of state labels in the Data Inspector, you would need to modify the Stateflow chart itself. The order of appearance of states in the chart determines the order in which they are displayed in the Data Inspector. Therefore, you can rearrange the states in the chart to achieve the desired order in the Data Inspector.
Here are the steps to rearrange the state labels:
By rearranging the states in the Stateflow chart, you can control the order in which they appear along the y-axis in the Data Inspector and achieve a more useful arrangement for your specific needs.
0 Commenti
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Complex Logic in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!