Getting a mean of only the numbers
4 次查看(过去 30 天)
显示 更早的评论
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?
0 个评论
采纳的回答
更多回答(1 个)
Thorsten
2014-10-9
Use nanmean
1 个评论
Mischa Kim
2014-10-9
That's another option. You need to have access to the Statistics Toolbox though.
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!