stop for loop if a thing happens
이전 댓글 표시
for example:
for i=1:10
a=i+1
if a>5
exit from loop % *which command do this*
end
end
채택된 답변
추가 답변 (2개)
Wesley Ooms
2011년 9월 8일
0 개 추천
the command is 'return' i guess
Wesley Ooms
2011년 9월 8일
0 개 추천
i looked it up for you. the command is 'break' :)
댓글 수: 2
Oleg Komarov
2011년 9월 8일
@Weasley: please edit your answers in place of creating new ones.
feras almasri
2015년 4월 4일
plz answer him instead of saying this
카테고리
도움말 센터 및 File Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!