The easiest way is to use cat to concatenate the cell array of numeric arrays into a simple 3D numeric array, and then use the inbuilt mean function with its optional second argument to take the average along the third dimension: X = your cell array
Y = cat(3,X{:});
out = mean(Y,3);
Here is a simple example showing how this works:
>> X = {[1,2,3;4,5,6],[0,2,4;6,8,10]};
>> Y = cat(3,X{:})
Y(:,:,1) =
1 2 3
4 5 6
Y(:,:,2) =
0 2 4
6 8 10
>> out = mean(Y,3)
out =
0.5 2 3.5
5 6.5 8
Best Answer