sorted two different arrays

1 vue (au cours des 30 derniers jours)
Cem SARIKAYA
Cem SARIKAYA le 19 Mai 2019
Commenté : Cem SARIKAYA le 19 Mai 2019
hello, I have two different variables one of them is table, one of them is cell with the same number of rows. I need to sort both of them with table 1st column how can ı do that?

Réponse acceptée

madhan ravi
madhan ravi le 19 Mai 2019
Modifié(e) : madhan ravi le 19 Mai 2019
[~,idx]=sort(T{:,1}); % T your table
C(idx,:) % C your cell become sorted according to first column of table
T(idx,:) % T becomes sorted according to first column of its own
  1 commentaire
Cem SARIKAYA
Cem SARIKAYA le 19 Mai 2019
Thank you very much

Connectez-vous pour commenter.

Plus de réponses (0)

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