title: Matlab Principal Component Analysis (eigenvalues order)
body: <p>I want to use the "princomp" function of Matlab but this function gives the eigenvalues in a sorted array. This way I can't find out to which column corresponds which eigenvalue.
  For Matlab,</p>
  
  <pre><code>m = [1,2,3;4,5,6;7,8,9];
  [pc,score,latent] = princomp(m);
  </code></pre>
  
  <p>is the same as</p>
  
  <pre><code>m = [2,1,3;5,4,6;8,7,9];
  [pc,score,latent] = princomp(m);
  </code></pre>
  
  <p>That is, swapping the first two columns does not change anything. The result (eigenvalues) in latent will be: (27,0,0)
  The information (which eigenvalue corresponds to which original (input) column) is lost.
  Is there a way to tell matlab to not to sort the eigenvalues?</p>