may i ask how to sort the row of matrix in large data?

조회 수: 1 (최근 30일)
loong seow li
loong seow li 2016년 5월 6일
댓글: loong seow li 2016년 5월 6일
may i ask how to sort the row of matrix in large data? For example, there are 28694 rows... how I arrange the rows according my own number?
a=[a0, a1,................,a28694]
Let say I want arrange in
b=[a4,a5,a28694,.......,a2,a56,a34]
is that possible arrange like this?
  댓글 수: 2
CS Researcher
CS Researcher 2016년 5월 6일
How do you define your own numbers? Is it random? Is there a pattern?
loong seow li
loong seow li 2016년 5월 6일
it is a array from other data...

댓글을 달려면 로그인하십시오.

답변 (1개)

Azzi Abdelmalek
Azzi Abdelmalek 2016년 5월 6일
a=[10 20 4 5]
idx=[2 1 3 4]
out=a(idx)
  댓글 수: 3
Azzi Abdelmalek
Azzi Abdelmalek 2016년 5월 6일
You have to define the new order.
loong seow li
loong seow li 2016년 5월 6일
thanks a lot

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Shifting and Sorting Matrices에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by