MATLAB: Break statement after if loop inside a for loop..

digital image processingdigital signal processingimage processingsignal processing

Hi..I have doubt if we are using an if loop inside a for loop followed by a break ,whether the break function will break if loop or for loop ..for example..
for i=1:100
if (statement1)
a=b
break
end
if (statement2)
b=c
in this which loop break will break ..if or for loop..
thanks

Best Answer

The break will exit the for-loop. if...end's are not loops.