Azzera filtri
Azzera filtri

How can I jump from line 8 to line 2?

7 visualizzazioni (ultimi 30 giorni)
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.

Risposta accettata

Mischa Kim
Mischa Kim il 30 Giu 2014
Modificato: Mischa Kim il 30 Giu 2014
Hello Febin, you could use something like:
exitFLAG = 0;
while ~exitFLAG
exitFLAG = 1;
exitFLAG = 0;
The loop is executed until the if-condition is true and the exitFLAG is set to 1.

Più risposte (0)


Scopri di più su Loops and Conditional Statements in Help Center e File Exchange



Community Treasure Hunt

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

Start Hunting!

Translated by