average between files with cell array of doubles
显示 更早的评论
Hi matlab people!
I have a cell array 'data' of (40,50) cells, each of cell is a matrix [70 x 100]
I need to get 1,50 cells of [70 x 100] averaging for 40 rows in each column of cells
So i try to run the loop:
for i = 1:50
for j=1:1:70
for k=1:100
for h=1:40
a = []
a(h) = data{h,i}(j,k)
end
avg_a=mean(a)
avg_cells{1,i}(j,k) = avg_a
end
end
end
What do i do wrong? Or maybe there is a simplier way to average between cell-arrays?
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Matrices and Arrays 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!