필터 지우기
필터 지우기

Info

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

Disrupting a "distant" while loop

조회 수: 1 (최근 30일)
Michaël
Michaël 2016년 3월 15일
마감: MATLAB Answer Bot 2021년 8월 20일
Hello,
if obj.State
obj.function
else
%disrupt the execution of obj.function
end
If obj.State isn't equal to 1, I'd like to disrupt the execution of the obj.function function, which includes a while 1 (infinite) loop.
What do you think?
Thank you very much
  댓글 수: 1
dpb
dpb 2016년 3월 15일
편집: dpb 2016년 3월 15일
I think it's hopeless without a way to communicate to the function other than terminating the script entirely. Also, there's no way to get from the if clause to the else one while the function is running unless you've spawned a separate process as the code is serial at that point.

답변 (0개)

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

제품

Community Treasure Hunt

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

Start Hunting!

Translated by