Compare big matrices A ,B
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
I Have 2 big matrix A, B with the same dimension (mxn) that n>>m. I apply the princomp function on those for computing the principal components because I wanted to reduce those dimension for comparing those with each other. I want to find that which row of those matrices has biggest difference with each other. Is it possible by comparing the angles between the eigenvectors that I computed by the princomp function (principal components of the 2 matrix)?? It really appreciated if you get me some proposal and help. Thank you for your time and help. Kamal
3 Kommentare
Image Analyst
am 23 Nov. 2013
I agree with Jan - I'm confused too. After you do PCA on A and on B, you'll have two more sets of axes (one for each PC set on A and B) Are you comparing rows of A to rows of A? And same for B? Or are you comparing rows of A to rows of B? Or the angle between PC1 of A with PC2 of A? Or PC1 of A with PC1 of B? Please clarify.
Antworten (1)
Image Analyst
am 23 Nov. 2013
Bearbeitet: Image Analyst
am 23 Nov. 2013
Try this
comparison = abs(A-B);
[maxValue, indexOfMax] = max(comparison);
% Get row and column from linear index.
[row, col] = ind2sub(size(A), indexOfMax);
How does that work for you?
0 Kommentare
Siehe auch
Kategorien
Mehr zu Dimensionality Reduction and Feature Extraction finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!