MATLAB: Find mean of last five cells in cell array.

cell array

I have a cell array (87×2) that has been sorted in descending order according to the values in column 1. I want to find the mean of the last five cells. Attached is an example of the cell array

Best Answer

You may convert your cell into double/ matrix and do what you want:
load example.mat ;
k = cell2mat(AMJ06sort) ;
% pick last five
iwant = k(end-5:end,:) ;
Find the mean of iwant. doc mean to find the mean.