How to skip the following for loop

6 visualizaciones (últimos 30 días)
A.K
A.K el 11 de Ag. de 2016
Editada: Azzi Abdelmalek el 11 de Ag. de 2016
When the condition of an if statement is met, it will do an assignment, and then it should skip the following for loop. If the condition of the if statement is not met, the program should then move into the for loop.
if(condition)
A=B;
Skip for loop.
end
for i=1:L
lines of code;
end

Respuestas (1)

Azzi Abdelmalek
Azzi Abdelmalek el 11 de Ag. de 2016
Editada: Azzi Abdelmalek el 11 de Ag. de 2016
if(condition)
A=B;
else
for i=1:L
lines of code;
end
end

Categorías

Más información sobre Loops and Conditional Statements en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by