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

1 vue (au cours des 30 derniers jours)
loong seow li
loong seow li le 6 Mai 2016
Commenté : loong seow li le 6 Mai 2016
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 commentaires
CS Researcher
CS Researcher le 6 Mai 2016
How do you define your own numbers? Is it random? Is there a pattern?
loong seow li
loong seow li le 6 Mai 2016
it is a array from other data...

Connectez-vous pour commenter.

Réponses (1)

Azzi Abdelmalek
Azzi Abdelmalek le 6 Mai 2016
a=[10 20 4 5]
idx=[2 1 3 4]
out=a(idx)
  3 commentaires
Azzi Abdelmalek
Azzi Abdelmalek le 6 Mai 2016
You have to define the new order.
loong seow li
loong seow li le 6 Mai 2016
thanks a lot

Connectez-vous pour commenter.

Catégories

En savoir plus sur Shifting and Sorting Matrices dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by