continue

Programming

Skip the rest of the current loop iteration and proceed to the next iteration.

Syntax

continue

Examples

for i = 1:10
  if mod(i, 2) == 0
    continue
  end
  disp(i)  % prints odd numbers only
end
▶ Run

See Also

Try SimLab — Free MATLAB® Alternative

466 functions. Runs in your browser. No install.

Open SimLab

Stay Updated

Get notified about new simulations and tools. We send 1-2 emails per month.