Getting a mean of only the numbers
古いコメントを表示
I have a dataset and I want the mean value of the numbers. There are a lot of NaN-values in there and I want to ignore those (the code
mean(data)
now gives 'NaN' as answer) How do I do this?
採用された回答
その他の回答 (1 件)
Thorsten
2014 年 10 月 9 日
1 投票
Use nanmean
1 件のコメント
Mischa Kim
2014 年 10 月 9 日
That's another option. You need to have access to the Statistics Toolbox though.
カテゴリ
ヘルプ センター および File Exchange で Descriptive Statistics についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!