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 endend
What do i do wrong? Or maybe there is a simplier way to average between cell-arrays?
Best Answer