How to get the name of Active State in Stateflow

1 回表示 (過去 30 日間)
Zihao Liu
Zihao Liu 2019 年 4 月 24 日
回答済み: Fangjun Jiang 2019 年 4 月 24 日
I want to get the name of Active State in Stateflow.
Until now I only find some blocks or methods, which can monitor the status of Active State in Stateflow. It can only be used or seen in "Scope" block.
If it is possible to get the name of Active State in Stateflow as a char or string data?

回答 (1 件)

Fangjun Jiang
Fangjun Jiang 2019 年 4 月 24 日
A typical way is to add an output to the chart. In each state, add a during action that assign this output with the value of the state (either number or char or string).

カテゴリ

Help Center および File ExchangeComplex Logic についてさらに検索

製品


リリース

R2018a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by