title: Extract square matrices from a Nx2 matrix
body: <p>I'm working on matlab 2014, I have a matrix 5124x2 and I want to extract all the 2562 square matrices.
  I found that the unique solution is to use mat2Cell, but it doesn't work for me. I don't really need a cell array at the end, what I want is just all the square matrices</p>
  
  <pre><code>%example of data
  A = rand(5124,2);
  C = mat2cell(A,2,2*ones(2562,1));
  </code></pre>
  
  <p>I get the following error :</p>
  
  <pre><code>Error using mat2cell (line 106)
  Input arguments, D1 through D2, must sum to each dimension of the input matrix size, [5124     2].'
  </code></pre>
  
  <p>Can you help me please ? Thanks</p>