How can I jump from line 8 to line 2?

4 次查看(过去 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 中查找有关 Loops and Conditional Statements 的更多信息

标签

产品

Community Treasure Hunt

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

Start Hunting!

Translated by