Borrar filtros
Borrar filtros

Info

La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.

How to calculate the mean of an image if I want to delete some value?

2 visualizaciones (últimos 30 días)
Ajaree Rattanaharn
Ajaree Rattanaharn el 17 de En. de 2019
Cerrada: MATLAB Answer Bot el 20 de Ag. de 2021
value.png
the picture above show the value of my picture
I don't know how to calculate the mean of all value if I don't want the value that >185
I must use what code?
Help me please TT

Respuestas (1)

madhan ravi
madhan ravi el 17 de En. de 2019
Editada: madhan ravi el 17 de En. de 2019
matrix=double(matrix); % where matrix is the matrix of which you are trying to calculate the mean of
matrix(matrix>185)=NaN;
Result=mean(matrix(:),'omitnan') % mean along all dimensions
result=mean(a,1,'omitnan') % mean along columns
result=mean(a,2,'omitnan') % mean along rows
result(~isnan(result)) % to omit NaN values from the result
  2 comentarios
madhan ravi
madhan ravi el 17 de En. de 2019
Editada: madhan ravi el 17 de En. de 2019
Anytime :) , if it was what you were looking for make sure to accept the answer.

La pregunta está cerrada.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by