sorted two different arrays

2 visualizaciones (últimos 30 días)
Cem SARIKAYA
Cem SARIKAYA el 19 de Mayo de 2019
Comentada: Cem SARIKAYA el 19 de Mayo de 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?

Respuesta aceptada

madhan ravi
madhan ravi el 19 de Mayo de 2019
Editada: madhan ravi el 19 de Mayo de 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

Más respuestas (0)

Categorías

Más información sobre Shifting and Sorting Matrices en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by