how to calculate sum between cell

1 回表示 (過去 30 日間)
Fabyola
Fabyola 2021 年 10 月 18 日
回答済み: Mathieu NOE 2021 年 10 月 18 日
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

採用された回答

Mathieu NOE
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 件)

カテゴリ

Help Center および File ExchangeMultidimensional Arrays についてさらに検索

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by