title: how to exit from two nested for loop in matlab
body: <p>I have a <code>while</code> loop in which I have two <code>for</code> loops. I have a condition in the innermost <code>for</code> loop. Whenever that condition is satisfied I want to exit from both the two <code>for</code> loops and continue within the <code>while</code> loop:</p>
  
  <pre><code>while (1)
      for x=1:20
          for y=1:30
              if(condition)
  
              end
          end
      end
  end
  </code></pre>
  
  <p>Does Matlab have something like a labeled statement in Java, or is there another way to do this?</p>