I want to check this property with code in Simulink StateFlow. I found that there is no direct identifier. Is there any way to check this option? (Create output for monitoring
조회 수: 3 (최근 30일)
이전 댓글 표시
I want to check this property with code in Simulink StateFlow. I found that there is no direct identifier. Is there any way to check this option?
(Create output for monitoring:)

댓글 수: 0
답변 (1개)
Divyajyoti Nayak
2024년 12월 17일
편집: Divyajyoti Nayak
2024년 12월 20일
To programmatically check the option “Create output for monitoring” in the Stateflow chart’s properties, you can make use of the “HasOutputData” property of the “Stateflow.Chart” object.
chart.HasOutputData = 1;
The 'OutputMonitoringMode' property can be used to set the mode of the output data.
chart.OutputMonitoringMode = ‘ChildActivity’;
To access your Stateflow chart object, the “find” function can be used.
chartArray = find(sfroot,"-isa","Stateflow.Chart");
Here’s some documentation to help you out:
“find” function: https://www.mathworks.com/help/stateflow/api/accessing-existing-stateflow-objects.html
'HasOutputData' :
“OutputMonitoringMode”:
댓글 수: 3
Divyajyoti Nayak
2024년 12월 20일
Oh my mistake, then instead of the 'OutputMonitoringMode' property, you can use the 'HasOutputData' property. I'll edit the answer above.
Ying Fu
2025년 2월 10일
Yes, you can remove the check box with this setting
chart.HasOutputData = 0;
This is the mode for modifying it
chart.OutputMonitoringMode = ‘ChildActivity’;
참고 항목
카테고리
Help Center 및 File Exchange에서 Simulink Functions에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!