How to exclude NaN values from evaluation on raster data

5 views (last 30 days)
I have a raster which have NaN values. I would like to evaluate graythresh for my data, but the NaN values are taken into account and as a results I have 0 (zero). Is there a way to exclude NaN values from evaluation or remove them from data?

Accepted Answer

Sean de Wolski
Sean de Wolski on 5 Aug 2015
x_no_nans = x(~isnan(x))
  4 Comments
Karolina
Karolina on 7 Aug 2015
Edited: Karolina on 7 Aug 2015
I have two datasets where the threshold is zero. EM is for these data: 0.9862, and 0.5902

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!

Translated by