title: Struct to cell (or matrix) in Matlab
body: <p>I have a structure with fields <code>ID</code>,<code>Coor</code>,<code>Misc</code>,<code>Conn</code>. <code>ID</code> and <code>Misc</code> are doubles, however, <code>Coor</code> is a 1x3 vector and <code>Conn</code> is a 1xn vector (where n can theoretically be from 0 to inf). </p>
  
  <pre><code>Point(x).ID = [x]
  Point(x).Coordinate = [xPos yPos zPos]
  Point(x).Misc = [randomDouble]
  Point(x).Conn = [someVectorOfNumbers]
  </code></pre>
  
  <p>I would like to have this mapped on a cell array, without using a FOR loop.</p>
  
  <p>An example of the output:</p>
  
  <pre><code>'ID    xPos    yPos    zPos    Misc    Conn'
   1      0        0       0       0    '0 1 2'
   2      1        1       1       1      ''     
   ...
   x      x        x       x       x      '2'
  </code></pre>
  
  <p>Notice that <code>Point.Conn</code>, its vector of numbers gets converted into a string.</p>
  
  <p>The issues that I am having is breaking up <code>Point.Coordinate</code> into its three elements, and converting <code>Point.Conn</code> into a string.</p>
  
  <p>I feel like this can be done using struct2Cell and then changing the nesting level. I'm just not exactly sure how to do that.</p>