I have a 1024x704x256 image which I have reorganized into a 2D matrix. Each row represents an energy channel and each column represents a pixel. I am performing PCA to reduce the number of bands with the code:
A=A-repmat(mean(A,2),1,size(A,2));
[V, D] = eig(cov(A'));
Evalues = diag(D);
pc = V * A;
where A=mean adjusted 2D data set, V=matrix of eigenvectors, and D=matrix of eigenvalues.
My problem is that the outputs (using either eigs or eig) for V and D are automatically in ascending order. I have not had this issue using these functions before on smaller data sets. I need to know which vector/value pairs correspond to the rows in matrix A for further analysis. Any ideas?
The eigenvalue/eigenvector problem can be defined as
where
lambdais scalar (an eigenvalue), andVis a vector (an eigenvector).As far as I can see, nor the eigenvalues nor the eigenvectors have any specific correspondence to individual rows in the matrix
A.Can you elaborate on why you don’t want your eigenvalues/vectors to be ordered?