title: Matlab populate arrays of matrices
body: <p>I am still a newbe and I have probabily a very easy question concerning arrays of matrices. I have a matrix of <code>n</code>rows like the following one:</p>
  
  <pre><code>&gt;&gt; matrix
   1 678 543
   2 676 541
   3 543 987
   4 543 98
   1 433 54
   2 908 32
   3 457 54
   4 235 21
  </code></pre>
  
  <p>How to create arrays of equal size matrices?
  i.e <code>array{i,1}</code></p>
  
  <p>This is replication of question:
  <a href="https://stackoverflow.com/questions/466972/array-of-matrices-in-matlab">Array of Matrices in MATLAB</a>
  and probably of many others.</p>
  
  <p>What is not clear to me, is how to populate my array of fixed dimension matrices. So that</p>
  
  <pre><code>&gt;&gt;array{1,1}
  1 678 543
  2 676 541
  3 543 987
  4 543 98
  </code></pre>
  
  <p>Here is my attempt:<br>
  Find all the ones in column <code>1</code> of <code>matrix</code> and the <code>size</code> of <code>matrix</code>.
  Create <code>cell</code> arrays, look in each line, if it is equal to <code>1</code> create an <code>array{i,1}</code> of zeros equal to the size of the matrices I want to create (in my case <code>4x3</code>).<br>
  If not equal to <code>1</code> insert into the array the first four values of matrix.</p>
  
  <p>Is there any faster way to do it without a loop?</p>