필터 지우기
필터 지우기

Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

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

조회 수: 2 (최근 30일)
selborne
selborne 2013년 4월 20일
마감: MATLAB Answer Bot 2021년 8월 20일
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
  댓글 수: 1
Azzi Abdelmalek
Azzi Abdelmalek 2013년 4월 20일
Do you want to import the data ?

답변 (2개)

Azzi Abdelmalek
Azzi Abdelmalek 2013년 4월 20일
[a,b,c]=xlsread('yourfile.xls')
out=sortrows(c,-1)

Matthias
Matthias 2013년 4월 20일
편집: Matthias 2013년 4월 20일
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)

이 질문은 마감되었습니다.

태그

Community Treasure Hunt

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

Start Hunting!

Translated by