title: matlab matrix get values in different columns
body: <p>Let my matrix be:</p>
  
  <pre><code>        A = 
          [1,2,3;
          4,5,6;
          7,8,9];
  </code></pre>
  
  <p>I have to extract the values in (1,2), (2,3), (3,1).
  I tried the following:</p>
  
  <pre><code>        c = [2,3,1]';
  
          A(:, c)
  </code></pre>
  
  <p>but it gives a 3x3 matrix instead of 3x1.</p>
  
  <p>How can I do it efficiently in matlab?</p>