MATLAB Answers

0

How to Remove NaN (missing values) from 3d array, temporally and spatially?

Asked by Behzad Navidi on 13 Oct 2019
Latest activity Edited by Behzad Navidi on 13 Oct 2019
Dear all,
I have a 3 dimension array (longitude*latetude*time) which I was read from a NetCDF file. This array has some NaN values. My question is how to remove this NaN in all spatial and temporal dimensions?
I need to remove because I want to use gridinterpolant function in the next step.
My Matlab version is R2015a
Thank you all.

  2 Comments

Do you want to replace them with something?
Do you want to remove the entire row that they are on, in all of the panes?
Do you want to remove the entire column that they are on, in all of the panes?
Do you want to remove the entire timestep that they are on?
I want to interpolate them and fill these gaps. Because I want to regrid my data. I think if NaNs exist, then interpolation can't be successful implement and if delete column or row my database get really small. Thanks

Sign in to comment.

1 Answer

Answer by Walter Roberson
on 13 Oct 2019
 Accepted Answer

I suggest you look in the File Exchange for inpaint_nans

  0 Comments

Sign in to comment.