Adding data in cells
1 回表示 (過去 30 日間)
古いコメントを表示
I have a cell array size(C)= 42 1 C= [31*32 double] [31*32 double] [31*32 double] [31*32 double] . . .
I want to add all these cells in such a way that the final cell which i obtain is same size [31 * 32] as individual cells having the values added on same positions.
0 件のコメント
回答 (2 件)
Yoav Livneh
2011 年 3 月 22 日
There's probably a way to do this without for loops but this is my suggestion:
L=length(C);
MatSize=size(C{1});
D=zeros(MatSize);
for jj=1:L
D=D+C{jj};
end
0 件のコメント
Paulo Silva
2011 年 3 月 22 日
C{end+1}=C{1:end};
This will add another cell to C that's the sum of the previous cells.
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!