필터 지우기
필터 지우기

How to get a handle of state chart ? and how to read the chart flow using script ?

조회 수: 3 (최근 30일)
Ajay Pherwani
Ajay Pherwani 2013년 3월 19일
답변: Jorge Calvo 2021년 11월 2일
1.how can I read the number of charts present in the model ? 2.Also how to read a logic inside the state chart ? ( if we consider there is only state flow with simple if else condition in it )
If i can get any information in any variables/arrays /cell using scripts that would be really helpful !!

답변 (1개)

Jorge Calvo
Jorge Calvo 2021년 11월 2일
For the first question, try:
>> numel(find(sfroot,"-isa","Stateflow.Chart"))
Asusming that there is only one model loaded in memory, this should give you what you want. If there are other models, you can use find to get a handle on the Stateflow.Machine object that corresponds to the model you want to get information about. For more information about using the Stateflow programatic interface, see https://www.mathworks.com/help/stateflow/api/overview-of-the-stateflow-api.html.
PS. On older versions of MATLAB, try using single quotes instead of double quotes.

카테고리

Help CenterFile Exchange에서 Stateflow Programmatic Interface에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by