average between files with cell array of doubles
Mostrar comentarios más antiguos
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?
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Matrices and Arrays en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!