title: MATLAB: copy a specific portion of an array
body: <p>I am trying to copy a few elements from a matrix, but not a whole row, and not a single element.</p>
  
  <p>For example, in the following matrix:</p>
  
  <pre><code>a = 1 2
      3 4
      5 6
      7 8
      9 0
  </code></pre>
  
  <p>How would I copy out just the following data?</p>
  
  <pre><code>b = 1
      3
      5
  </code></pre>
  
  <p>i.e. rows 1:3 in column 1 only... I know that you can remove an entire column like this:</p>
  
  <pre><code>b = a(:,1)
  </code></pre>
  
  <p>... and I appreciate that <em>could</em> just do this and then dump the last two rows, but I'd like to use more streamlined code as I am running  a very resource-intensive solution.</p>