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!