MATLAB Answers

0

How to get the name of Active State in Stateflow

Asked by Zihao Liu on 24 Apr 2019
Latest activity Answered by Fangjun Jiang on 24 Apr 2019
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?

  0 Comments

Sign in to comment.

Products


Release

R2018a

1 Answer

Answer by Fangjun Jiang on 24 Apr 2019

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

  0 Comments

Sign in to comment.