MATLAB: Score matrix is the principal components

componentspcaprincipalprincipal componensprincomp

OK here is what i have understood about principal components in matlab. suppose i use "princomp" on a MxN data, then it returns me with a score matrix which is also MxN. But the first 3 columns of this score matrix gives the principal components of the original data which is also the Eigen vectors corresponding to the max eigen values of the covariance of the data.
Kindly correct me if my understanding is wrong.
Thanks

Best Answer

You are basically correct. It is not just the first 3 vectors that are principal components, but all the vectors are the complete set of principal components. They reported in the decreasing order of variance explained (which is decreasing order of magnitude of eigenvalue).
Also, you might want to use the pca command rather than princomp. According to the documentation, they may remove princomp.
Related Question