Filter löschen
Filter löschen

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 Ansichten (letzte 30 Tage)
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

Antworten (1)

KSSV
KSSV am 9 Nov. 2017
  1 Kommentar
Guillaume
Guillaume am 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')

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Creating and Concatenating Matrices finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by