break while loop matlab code example
Example 1: break loop for matlab
for i=1:10
limit=5;
if i > limit
break
end
end
Example 2: matlab while loop
n = 10;
while n > 1
n = n-1;
end
for i=1:10
limit=5;
if i > limit
break
end
end
n = 10;
while n > 1
n = n-1;
end