how do i sort a single row in terms of descending terms

i was given an excel file with 5 row and 5 columns and i need to sort the first column in terms of descending terms, i managed to successfully open the excel file on matlab

Réponses (2)

[a,b,c]=xlsread('yourfile.xls')
out=sortrows(c,-1)
Matthias
Matthias le 20 Avr 2013
Modifié(e) : Matthias le 20 Avr 2013
If you only want to sort the first column have a look at
B = sort(A,dim)
If you want to sort the whole matrix according to the first column use
B = sortrows(A,-1)

Cette question est clôturée.

Tags

Question posée :

le 20 Avr 2013

Clôturé :

le 20 Août 2021

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by