How to display the values of a Stateflow local data during simulation.

조회 수: 4 (최근 30일)
Mirko Mirabella
Mirko Mirabella 2024년 2월 20일
댓글: Mirko Mirabella 2024년 2월 20일
Good morning, I am writing this request to gather some information on how to monitor the behavior of a local Stateflow variable during simulation. Currently, the only method I have found is to convert it into an output and visualize it on a logic analyzer, but I believe this is a less efficient approach.

답변 (1개)

Aquatris
Aquatris 2024년 2월 20일
I think this is what you are looking for.
Essentially you define the variable in your stateflow as a logged data (from Property Inspector), and when you run your simulation, it automatically sends the data to the matlab workspace. You then can see it via
myData = get(logsout,"myData");
myData.Values
  댓글 수: 1
Mirko Mirabella
Mirko Mirabella 2024년 2월 20일
Thank you Acquatris for your response. I have tested and verified this method on other occasions. I was wondering if there is a way to monitor the trend of the variable during simulation, similar to the display on the logic analyzer.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Complex Logic에 대해 자세히 알아보기

제품


릴리스

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by