sorting a matrix based on L2 norm of each row
Mostra commenti meno recenti
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
Risposta accettata
Più risposte (1)
David Hill
il 23 Apr 2020
[~,idx]=sortrows(vecnorm(C,2,2));
C=C(idx,:);
Categorie
Scopri di più su Shifting and Sorting Matrices in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!