How to ignore certain values in A histogram?

Say I have an grey scale image S and I'm looking to ignore all values above 250, how do I do it with out using NaN? the reason I don't want to use NaN is because Im looking to take statistical information from the resultant image such as average etc.

 Respuesta aceptada

Chad Greene
Chad Greene el 21 de Abr. de 2015

0 votos

You can get statistics with NaNs using nanmean or mean(A(isfinite(A(:)))).

Más respuestas (0)

Preguntada:

el 21 de Abr. de 2015

Respondida:

el 21 de Abr. de 2015

Community Treasure Hunt

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

Start Hunting!

Translated by