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

2 vues (au cours des 30 derniers jours)
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

Réponses (1)

KSSV
KSSV le 9 Nov 2017
  1 commentaire
Guillaume
Guillaume le 9 Nov 2017
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')

Connectez-vous pour commenter.

Catégories

En savoir plus sur Creating and Concatenating Matrices dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by