title: Converting cell to structure in matlab
body: <p>I am trying to convert a cell into a structure:</p>
  
  <pre><code>A = {'p1', 10, 'ny'; 'p2', 12, 'nj'};
  </code></pre>
  
  <p>I would like a structure with 3 fields where</p>
  
  <pre><code>A.person = {'p1';'p2'}
  A.age = [10;12]
  A.state = {'ny', 'nj'}
  </code></pre>
  
  <p>I tried cell2struct but was getting in format I did not want.
  I know I am missing something simple. Any thoughts?</p>