フィルターのクリア

Mean of specific range in multiple double

1 回表示 (過去 30 日間)
Pinga
Pinga 2014 年 10 月 29 日
コメント済み: Pinga 2014 年 10 月 29 日
I have a 25x5 cell called Data, each with a 15x3 double. What I would like is to calculate are:
nanmean(Data{1:25,1}(:,3)),
nanmean(Data{1:25,2}(:,3)),
nanmean(Data{1:25,3}(:,3)),
nanmean(Data{1:25,4}(:,3)),
nanmean(Data{1:25,5}(:,3)).
So, basically to calculate the mean value of the third column of the doubles for every column of the cell, thus generating 5 mean value in total. I've already tried it with
nanmean(cellfun(@(x) mean(x(:,3)), Data))
but this doesn't calculate the mean values I'm looking for.
Any help would be appreciated!
  2 件のコメント
per isakson
per isakson 2014 年 10 月 29 日
編集済み: per isakson 2014 年 10 月 29 日
"doesn't calculate the mean values I'm looking for" &nbsp I think that it indeed calculates the values you describe in the question. Nevermind mean instead of nanmean
You might want to give us a small numerical example.
Pinga
Pinga 2014 年 10 月 29 日
Thank you. I've checked it once again and noticed, that it works correctly. The command history showed me that I made an mistake yesterday when checking the command.

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeStructures についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by