sorting a matrix based on L2 norm of each row
Afficher commentaires plus anciens
Hello all
Please how to code; descendent sorting a matrix C(9000x9000) based on L2 norm of each row then reconstruct a new ranked matrix.
Thanks in advance
Réponse acceptée
Plus de réponses (1)
David Hill
le 23 Avr 2020
[~,idx]=sortrows(vecnorm(C,2,2));
C=C(idx,:);
Catégories
En savoir plus sur Shifting and Sorting Matrices dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!