title: How can I convert a cell to matrices by loop using with cell2mat in Matlab?
body: <p>I have a cell <code>A(361,1)</code> which contains <code>361 x 3D</code> matrices. The first and second dimensions of matrices are same but the length of third dimension varies.  </p>
  
  <p>So the cell A looks like:  </p>
  
  <pre><code>A={(464x201x31);(464x201x28);(464x201x31);(464x201x30)....}
  </code></pre>
  
  <p>I would like to get back the matrices from this cell by loop. I tried the following solution:</p>
  
  <pre><code>for i=1:361;
  M(i)=cell2mat(A(i));
  end 
  </code></pre>
  
  <p>But I got the following error: </p>
  
  <blockquote>
    <p>Subscripted assignment dimension mismatch.</p>
  </blockquote>