how to print a matrix as ranked sorted list?
Mostra commenti meno recenti
if I have this matrix [56 9 8 7 4 5 6 3 35 4 ] How to print is as
Rank Score
1 56.00
2 35.00
3 9.00
4 8.00
5 7.00
6 6.00
7 5.00
8 4.00
9 4.00
10 3.00
Risposte (1)
V = [56,9,8,7,4,5,6,3,35,4];
fprintf('Rank Score\n')
fprintf('%4d %.2f\n',[1:numel(V);sort(V,'descend')])
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!