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!