How to skip the following for loop

1 次查看(过去 30 天)
A.K
A.K 2016-8-11
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

回答(1 个)

Azzi Abdelmalek
Azzi Abdelmalek 2016-8-11
编辑:Azzi Abdelmalek 2016-8-11
if(condition)
A=B;
else
for i=1:L
lines of code;
end
end

类别

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