Effacer les filtres
Effacer les filtres

Sorting corresponding index if the position sorted in descend order?

1 vue (au cours des 30 derniers jours)
Rubel Ahmed
Rubel Ahmed le 22 Sep 2021
Modifié(e) : Rubel Ahmed le 23 Sep 2021
Hi all,
I have one dimensional particle aarray say P and the corresponding index I. Later, I have sorted the position data in descending order using descend comand like P_N. Now I want to done the change of the corresponding index effeciently(Since my original array is too large,thats whyI am not interested to use loop) as I_N. Thanks.
  2 commentaires
Stephen23
Stephen23 le 22 Sep 2021
@Rubel Ahmed: take a look at SORT's second output argument:
Rubel Ahmed
Rubel Ahmed le 22 Sep 2021
@Stephen thanks mate.Its done!

Connectez-vous pour commenter.

Réponses (0)

Catégories

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

Produits


Version

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by