MATLAB Answers

sorted two different arrays

1 view (last 30 days)
Cem SARIKAYA
Cem SARIKAYA on 19 May 2019
Commented: Cem SARIKAYA on 19 May 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?

  0 Comments

Sign in to comment.

Accepted Answer

madhan ravi
madhan ravi on 19 May 2019
Edited: madhan ravi on 19 May 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 Comment

Cem SARIKAYA
Cem SARIKAYA on 19 May 2019
Thank you very much

Sign in to comment.

More Answers (0)

Sign in to answer this question.

Tags