title: Use contents of a cell to name cell array?
body: <p>I have a cell array of cell arrays in Matlab, and I want to simplify things by naming each cell array based on the contents of one of it's cells.  Here is an example:</p>
  
  <pre><code>myCell1 = {'';'name1'; 'stuff';'two';'three'};
  myCell2={'';'name2';'more stuff';'4';'things'};
  Cell={myCell1, myCell2}
  </code></pre>
  
  <p>If I have <code>Cell</code> in the example above, I want to create two <strong>unnested</strong> cell arrays named based on the second row in each of them.  In this example, the result would be as follows:</p>
  
  <pre><code>name1 = 
  
  ''
  'name1'
  'stuff'
  'two'
  'three'
  
  name2 = 
  
  ''
  'name2'
  'more stuff'
  '4'
  'things'
  </code></pre>
  
  <p>How can I do this?  I tried indexing as follows, but it doesn't work (I don't how to make MATLAB recognize that I want the string in the cell array to be a name).</p>
  
  <pre><code>Cell{1,1}{2}=Cell{1,1};
  </code></pre>