title: Reshape MATLAB vector in Row-wise manner
body: <p>Say I have a matrix <code>a = [1 2 3 4 5 6];</code>, how do I reshape it in a row-wise manner for example
  <code>reshape(a, 2, 3)</code> to yield </p>
  
  <pre><code>1 2 3 
  4 5 6
  </code></pre>
  
  <p>rather than the default column-wise result produced by MATLAB of: </p>
  
  <pre><code>1 3 5 
  2 4 6
  </code></pre>
  
  <p>I believe this is a trivial task which probably has an inbuilt function to achieve this. I have already implemented a function that does this perfectly... however, is there a shorter, neater and more MATLAB way? Thanks.</p>
  
  <pre><code>function y = reshape2(x, m, n) 
    y = zeros(m, n);
  
    ix = 0; 
    for i = 1:m
       for j = 1:n
           ix = ix + 1;
           y(i, j) = x(ix);
       end 
    end 
  end
  </code></pre>