Compute the mean row cell elements in a cell array.
1 次查看(过去 30 天)
显示 更早的评论
Hello,
I have a 3x11 cell array. Each cell contains a 128 x 1000 element.
I would like to compute the mean of the all the rows but leaving the columns alone, so that the results will be a 1 x 11 cell array with each element = 128x1000. Please help. Thanks
Eric
0 个评论
采纳的回答
Stephen23
2021-12-9
Where C is your cell array:
fun = @(varargin)mean(cat(3,varargin{:}),3);
D = cellfun(fun,C(1,:),C(2,:),C(3,:),'uni',0)
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Cell Arrays 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!