sorted two different arrays
2 次查看(过去 30 天)
显示 更早的评论
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 个评论
采纳的回答
madhan ravi
2019-5-19
编辑:madhan ravi
2019-5-19
[~,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
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Shifting and Sorting Matrices 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!