how to get current path in a stateflow?

I want know how to get current system path in a stateflow?like 'gcs' function.

 採用された回答

Jonas
Jonas 2021 年 2 月 25 日

0 投票

You should look into Stateflow Animations. It will highlight the latest path taken in blue during simulation, and the last path taken when simulation is stopped.

3 件のコメント

asid
asid 2021 年 2 月 25 日
Sorry,there are some misunderstandings.I want to know how to get the current stateflow system path use programming,As shown in the figure below.I usually use the ‘gcs’ command to get it in subsystem,but it don't work when I was in the stateflow,the 'gcs' command only return the root path of the model,not the full path of the current stateflow.
Jonas
Jonas 2021 年 2 月 25 日
I misunderstood indeed.
Use gcb maybe? It works for a Stateflow, but when going outside of a stateflow, it still returns the path of the stateflow.
I am unsure how you intend to use the command, but maybe you can rely on gcs, but perform a check on when gcb returns a stateflow, then use gcb instead.
Jonas
Jonas 2021 年 2 月 25 日
I also found this MATLAB Question and Answer.
Maybe it is not possible...

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeSimulink Functions についてさらに検索

製品

リリース

R2016b

質問済み:

2021 年 2 月 25 日

コメント済み:

2021 年 2 月 25 日

Community Treasure Hunt

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

Start Hunting!

Translated by