Find mean of last five cells in cell array.

1 回表示 (過去 30 日間)
David du Preez
David du Preez 2016 年 7 月 5 日
編集済み: KSSV 2016 年 7 月 5 日
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 Center および File ExchangeCell Arrays についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by