필터 지우기
필터 지우기

exiting if condition and for loop?

조회 수: 118 (최근 30일)
Arunachalam  D
Arunachalam D 2015년 7월 18일
편집: Stefanie Schwarz 2022년 1월 4일
for i=1:100
if condition
operations;
else
continue
end
end
here continue will exit out of the if loop but thing is that if else statement executed it should come out of for loop. how can i do that

채택된 답변

per isakson
per isakson 2015년 7월 18일
Try
for i=1:100
if condition
operations;
else
break
end
end

추가 답변 (0개)

카테고리

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