Is there a way to interp3 without interpolating the NaNs?

20 visualizzazioni (ultimi 30 giorni)
I have a 3D volume with some NaN values in it. I want to interpolate the the volume in order to fill in the NaNs and also extrapolate the volume around it. When I use the 'linear' method it doesn't replace the NaNs and seems to extrapolate them. When I try to use 'spline', I get an error "Insufficient finite values to interpolate." Not sure why.

Risposta accettata

Walter Roberson
Walter Roberson il 2 Mar 2017
The fast and reliable https://www.mathworks.com/matlabcentral/fileexchange/4551-inpaint-nans is only documented to work in 2D, but I am told by a recent poster that it works on 3D as well, but that you will need to reshape the result back from 2D to 3D.

Più risposte (0)

Categorie

Scopri di più su Interpolation in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by