title: For loop with multiplication step in MATLAB
body: <p>Is there any way to use a for-loop in MATLAB with a custom step? What I want to do is iterate over all powers of 2 lesser than a given number. The equivalent loop in C++ (for example) would be:</p>
  
  <pre><code>for (int i = 1; i &lt; 65; i *= 2)
  </code></pre>
  
  <p><em>Note 1:</em> This is the kind of iteration that best fits for-loops, so I'd like to not use while-loops.<br>
  <em>Note 2:</em> I'm actually using Octave, not MATLAB.</p>