How to find the average of matrices in a cell??
3 次查看(过去 30 天)
显示 更早的评论
How to find the average of matrices in a cell. the cell is of size 1x10.
1 个评论
Jan
2017-3-26
What do you exactly want? The mean of each array store in the cell? The mean array over all arrays?
回答(1 个)
Jan
2017-3-26
Depending on what the questions exactly mean:
MeanC = cell(size(C));
for iC = 1:numel(C)
MeanC{iC} = mean(C{iC}); % Or: mean(C{iC}(:)) ?
end
Or:
MeanC = mean(cat(3, C{:}), 3);
if the cell elements are matrices and you want the avarage matrix.
A more precise and maybe more efficient answer is possible, when you explain the wanted operation.
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!