sorted two different arrays

3 Ansichten (letzte 30 Tage)
Cem SARIKAYA
Cem SARIKAYA am 19 Mai 2019
Kommentiert: Cem SARIKAYA am 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?

Akzeptierte Antwort

madhan ravi
madhan ravi am 19 Mai 2019
Bearbeitet: madhan ravi am 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

Weitere Antworten (0)

Kategorien

Mehr zu Shifting and Sorting Matrices finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by