Sorting a Cell Array
古いコメントを表示
Hi,
Sorry if this has been asked / answered many times or very simple etc. etc!
If I have a cell array say Array = {B C A;1 3 2; D E F}
Is it possible to sort the first row in order, so its A B C, with the second and third rows changing corresponding to to this initial sort?
Final answer being {A B C;2 1 3;F D E}
Thanks in advance Matthew
採用された回答
その他の回答 (3 件)
Andreas Goser
2011 年 12 月 23 日
0 投票
It is not clear to me what your cell array really looks like, as your example is not valid, but the SORTROWS command should work.
カテゴリ
ヘルプ センター および 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!