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 visualización (últimos 30 días)
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

Respuestas (1)

KSSV
KSSV el 9 de Nov. de 2017
  1 comentario
Guillaume
Guillaume el 9 de Nov. de 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')

Iniciar sesión para comentar.

Categorías

Más información sobre Creating and Concatenating Matrices en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by