title: How to create a sub-cell from a cell array in Matlab?
body: <p>Lets say I have following cell array data in Matlab:</p>
  
  <pre><code>&gt;&gt; data = {'first', 1; 'second', 2; 'third', 3}
  
  data = 
  
      'first'     [1]
      'second'    [2]
      'third'     [3]
  </code></pre>
  
  <p>Then I want to create a new cell array which has only the first column data. I tried the following but got only the <code>first</code> value instead.</p>
  
  <pre><code>&gt;&gt; column_1 = data{:,1}
  
  column_1 =
  
  first
  </code></pre>
  
  <p>But what I would like to get as output is:</p>
  
  <pre><code>&gt;&gt; column_1 = {'first';'second';'third'}
  
  column_1 = 
  
      'first'
      'second'
      'third'
  </code></pre>
  
  <p><strong>How can I create a sub-cell from first column of <code>data</code> cell array?</strong></p>