title: How to select first component and calculate percentage of variation in PCA?
body: <p>I have a matrix M where the columns are data points and the rows are features. Now I want to do PCA and select only the first component which has highest variance.</p>
  
  <p>I know that I can do it in Matlab with [coeff,score,latent] = pca(M'). First I think I have to transpose matrix M.</p>
  
  <p>How can I select now the first component? I'm not sure about the three different output matrices.</p>
  
  <p>Second, I also want to calculate the percentage of variance explained for each component. How can I do this?</p>