Summing up rows of a cell containing 3D matrices
1 回表示 (過去 30 日間)
古いコメントを表示
I wish to sum all rows of a cell below containing 3D arrays to obtain a cell summations as seen below and to further concatate the columns into a 3D array. I Please assist.
Cell =
5×5 cell array
{30×30×30 double} {30×30×30 double} {30×30×30 double} {30×30×30 double} {30×30×30 double}
{30×30×30 double} {30×30×30 double} {30×30×30 double} {30×30×30 double} {30×30×30 double}
{30×30×30 double} {30×30×30 double} {30×30×30 double} {30×30×30 double} {30×30×30 double}
{30×30×30 double} {30×30×30 double} {30×30×30 double} {30×30×30 double} {30×30×30 double}
{30×30×30 double} {30×30×30 double} {30×30×30 double} {30×30×30 double} {30×30×30 double}
% Sum rows to get the below cell summation
Cell_Summation =
1×5 cell array
{30×30×30 double} {30×30×30 double} {30×30×30 double} {30×30×30 double} {30×30×30 double}
% Concatate the columns to get the below final cell summation in the x axis or even better an a array
Final_Cell_Summation =
1×1 cell array % or array
{30×150×30 double}
0 件のコメント
採用された回答
Matt J
2021 年 1 月 19 日
C=reshape( cat(2,Cell{:}) ,[30,30,5,5,30]);
Final=reshape( sum(C,3) , 30,150,30);
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Logical についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!