Reduce size of multidimensional array
11 ビュー (過去 30 日間)
古いコメントを表示
Early Social Development Lab Lab
2021 年 2 月 8 日
コメント済み: James Tursa
2021 年 2 月 9 日
Hello,
I have a multidimensional array size = 220 x 46 x 10 x 4 x2 . I would like to combine all of the data in the third dimension so that way I end up with a 4-dimesional array. Any help is greatly appreciated.
Take care and stay well!
0 件のコメント
採用された回答
James Tursa
2021 年 2 月 8 日
One way using summing:
result = squeeze(sum(your_array,3));
7 件のコメント
James Tursa
2021 年 2 月 9 日
Yes. Reshape does not change the order of the data in memory. You will often need to use another function first such as permute or transpose etc. to rearrange the data in memory before applying the reshape.
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Creating and Concatenating Matrices についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!