I have a matrix of 100x100, and I need to do average of 10 - 10 row values, some are NaN's, those should be excloded, and finally i need 10x100 matrix, plz help
1 回表示 (過去 30 日間)
古いコメントを表示
I have a matrix of 100x100, and I need to do average of 10 - 10 row values, some are NaN's, those should be excloded, and finally i need 10x100 matrix, plz help
0 件のコメント
回答 (1 件)
KSSV
2017 年 11 月 9 日
Your question is already answered here.
To ignore NaN's while finding mean using nanmean.
1 件のコメント
Guillaume
2017 年 11 月 9 日
To ignore NaN's while finding mean using nanmean
For a few years now, the basic mean function has supported ignoring nans. No need for nanmeans:
mean(yourmatrix, 'omitnan')
参考
カテゴリ
Help Center および File Exchange で NaNs についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!