how to end a loop code example
Example 1: break loop for matlab
for i=1:10
limit=5;
if i > limit
break
end
end
Example 2: python get out of loop
while True:
print('I run!')
break
print('Not in loop!')
for i=1:10
limit=5;
if i > limit
break
end
end
while True:
print('I run!')
break
print('Not in loop!')