Not sure what do you mean by "re-sort the cell array according to the means" as you have two means corresponding to each cell. Below example shows how to take the means and each column within a cell, and sort the cell based on the mean of the first column.
ind = 1:10;
testCell = arrayfun(@(x) rand(randi(20), 2), ind, 'UniformOutput', 0);
meanInCell = cell2mat(cellfun(@mean, testCell, 'UniformOutput', 0)');
[~, indSort] = sort(meanInCell(:, 1));
sortTestCell = testCell(indSort);
Best Answer