필터 지우기
필터 지우기

Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

Stateflow chart coverage not 100% when only state entry action is executed

조회 수: 1 (최근 30일)
Arunkumar Muthukumaran
Arunkumar Muthukumaran 2015년 7월 22일
마감: MATLAB Answer Bot 2021년 8월 20일
I have a model, where I have added an entry action (en: x=0;) in a state say A and used the same as condition ( [x==0]) to exit the state A. In this case, as soon the state A is entered, the entry condition is executed and immediately, the state A is exited because of the condition. In this case, coverage results show that the state A is not executed. When I change the action in state A from en: to du:, then coverage results show that state is executed.
Does it mean that, all states have to be active for alteast two timesteps?
Thanks in advance.
  댓글 수: 1
Jon
Jon 2015년 7월 28일
Not sure exactly what you're asking, but perhaps you could use a dummy variable:
if x == 0
dummy = 1;
end
while dummy == 1
execute commands that update x here
if x == 0
dummy = 0;
end
end
Can also use the "break" command instead of the "dummy=0" line if you want to exit the loop immediately.

답변 (0개)

이 질문은 마감되었습니다.

Community Treasure Hunt

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

Start Hunting!

Translated by