How can I jump from line 8 to line 2?

조회 수: 7 (최근 30일)
Febin Benjamin
Febin Benjamin 2014년 6월 30일
댓글: Febin Benjamin 2014년 6월 30일
As there is no native 'goto' function in matlab plus the function provided in file exchange is not working, I am stuck here. I dont know how to jump from line 8 to line 2. That jump is required for my program to continue. Please Help.

채택된 답변

Mischa Kim
Mischa Kim 2014년 6월 30일
편집: Mischa Kim 2014년 6월 30일
Hello Febin, you could use something like:
exitFLAG = 0;
while ~exitFLAG
...
if
...
exitFLAG = 1;
else
exitFLAG = 0;
end
end
The loop is executed until the if-condition is true and the exitFLAG is set to 1.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 MATLAB Coder에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by