How does griddata handle NaN values in MATLAB 7.7 (R2008b)?
4 views (last 30 days)
Show older comments
I would like to know how the function griddata handles Nan values.
Accepted Answer
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.
0 Comments
More Answers (0)
See Also
Categories
Find more on Interpolation in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!