How does griddata handle NaN values in MATLAB 7.7 (R2008b)?

4 views (last 30 days)

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 8 Jul 2009
MATLAB doesn't perform any special-case treatment for the NaN data value.
As you may know, griddata performs a Delaunay triangulation of your (x,y) data points. When you query the interpolant at some (xi, yi) location, griddata searches
for the triangle Ti enclosing the point (xi, yi). It then interpolates the result based on the values at the vertices of Ti. If one of those vertices has a NaN value, then the NaN will dominate the computation and the interpolated value you get back will be NaN.

More Answers (0)

Categories

Find more on Interpolation in Help Center and File Exchange

Products


Release

R2008b

Community Treasure Hunt

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

Start Hunting!