how to calculate sum between cell
1 回表示 (過去 30 日間)
古いコメントを表示
i want to ask how do i supposed to do if i had a 'A' variables that contain 1x3 cell, and in every cell have 1x7 double. and i want to sum the every column of the cell. Thanks in advance
0 件のコメント
採用された回答
Mathieu NOE
2021 年 10 月 18 日
hello
see example below :
% example data
for ci = 1:3
A{ci} = rand(1,7);
end
% do a horizontal sum
B = sum(cell2mat(A(:)),2);
0 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Multidimensional Arrays についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!