title: MATLAB, how to change loop index inside for loops
body: <p>I have a loop like this:</p>
  
  <pre><code>b = 1;
  for c = 1 : 10;
    if b == 1
        c = 1 + 3
    end
  end
  </code></pre>
  
  <p>What do I need to do to make to change <code>c</code>?
  Because as I read through the help, MATLAB resets the loop counter <code>c</code> after it reaches <code>end</code>.</p>
  
  <p>Is there any way to change the value of the loop counter from within a <code>for</code> loop?</p>