How to skip the following for loop

조회 수: 3 (최근 30일)
A.K
A.K 2016년 8월 11일
편집: Azzi Abdelmalek 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