MATLAB: Calculating mean in array

arraycalculatecalculating arraycalculating meanmatrixmean

I got an 69 x 1 array, which contains 12 x 2 and some 13 x 2 matrices. I want to calculate the mean of the 2nd column of every matrix in the array. And if possible, get the results to show in an 69 x 1 matrix.
Thanks for the help!

Best Answer

cellfun( @(x) mean(x(:,2)), myArray )
should work, assuming you mean you have a cell array which is the only type of array that would fit your description.