How can I jump from line 8 to line 2?

6 ビュー (過去 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.
  1 件のコメント
Febin Benjamin
Febin Benjamin 2014 年 6 月 30 日
Thanx a lot Mischa! :)

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMATLAB Coder についてさらに検索

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by