average between files with cell array of doubles
Show older comments
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?
Accepted Answer
More Answers (0)
Categories
Find more on Matrices and Arrays in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!