필터 지우기
필터 지우기

How to highlight multiple Stateflow objects

조회 수: 2 (최근 30일)
Monika Jaskolka
Monika Jaskolka 2022년 3월 31일
편집: abcd xyz 2022년 10월 5일
I would like to highlight multiple objects in a Stateflow chart. I can use the highlight function to highlight one object, however, highlighting multiple at once causes an error: "Check for incorrect argument data type or missing argument in call to function 'highlight'.". Highlighting successively clears the previous highlighting. The equivalent hilite_system function for Simulink allows for multiple highlighting, but does not work for Stateflow. Is there another function that is capable of highlighting mutiple Stateflow objects?
openExample('simulink_general/sldemo_boilerExample');
obj = find(sfroot, '-isa', 'Stateflow.State');
highlight(obj);
Check for incorrect argument data type or missing argument in call to function 'highlight'

답변 (1개)

abcd xyz
abcd xyz 2022년 10월 5일
편집: abcd xyz 2022년 10월 5일
Here is a work around
openExample('simulink_general/sldemo_boilerExample');
obj = find(sfroot, '-isa', 'Stateflow.State');
for i=1:length(obj)
j{i,1}=Simulink.ID.getSID(obj(i))
end
Simulink.ID.hilite(j)
//Using 'Simulink.ID.hilite' is not recomended by matlab..but (Life's not fair,is it?)..//

카테고리

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

태그

제품


릴리스

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by