How can I sort an array of structures based upon a particular field in MATLAB?
3 ビュー (過去 30 日間)
古いコメントを表示
![WeChat Screenshot_20190420221641.png](https://www.mathworks.com/matlabcentral/answers/uploaded_files/215102/WeChat%20Screenshot_20190420221641.png)
I've got a eeg_data_all(cell,size = 1*35), which contains 35*3 cells maybe. I want to sort these data by the 'subid'. How can I do this?
1 件のコメント
Walter Roberson
2019 年 4 月 20 日
Each eeg_data_all{P,Q} is to be sorted separately by the subid field of its struct, or all eeg_data_all(:,:) are somehow to be sorted together, considering all of the subid for all of the cells?
Is there are reason why you stored struct in cell instead of using a nonscalar struct array?
回答 (1 件)
参考
カテゴリ
Help Center および File Exchange で Structures についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!