Find mean of last five cells in cell array.

1 次查看(过去 30 天)
I have a cell array (87x2) 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

采纳的回答

KSSV
KSSV 2016-7-5
编辑:KSSV 2016-7-5
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.

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Matrices and Arrays 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by