1 view (last 30 days)
I would like to sort a matrix included of alphabet and values for example a matrix with 10 columns or more the first column is included letter the second is included letter the third is included letter and the rest are values
I would like to know how to sort them based on for example first column then how to sort them based on second column and so on?
Thomas on 12 Jun 2012
'abc' 'dmf' 'jkl' [1x3 double] [1x3 double] [1x3 double]
'pqr' 'abc' 'jkl' [1x3 double] [1x3 double] [1x3 double]
If you want to sort based on first column use
sortrows(A,1) % sort the entire row based on column1
sortrows(A,2) % sort the entire row based on column2 and so on..