Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

NaN's in triangulation

10 views
Skip to first unread message

Em Bramham

unread,
Mar 1, 2010, 5:37:02 AM3/1/10
to
Hello,

I'm trying to triangulate some data using the griddata function, linear triangulation method. Prior to triangulation the data does not contain any NaNs, however after triangulation there are a number of NaNs in the data that are creating holes in the surface when plotted. Does anyone know why triangulation is creating these holes, and if so, how I can stop it from happening??

Any help appreciated,
Cheers,
Emma

us

unread,
Mar 1, 2010, 6:04:06 AM3/1/10
to
"Em Bramham" <ee...@leeds.ac.uk> wrote in message <hmg5ce$7kb$1...@fred.mathworks.com>...

you may want to look at jd's FEX submission GRIDFIT to learn more about the subject and to see how one can deal with it...

http://www.mathworks.com/matlabcentral/fileexchange/8998

us

John D'Errico

unread,
Mar 1, 2010, 8:21:04 AM3/1/10
to
"Em Bramham" <ee...@leeds.ac.uk> wrote in message <hmg5ce$7kb$1...@fred.mathworks.com>...
> Hello,
>
> I'm trying to triangulate some data using the griddata function, linear triangulation method. Prior to triangulation the data does not contain any NaNs, however after triangulation there are a number of NaNs in the data that are creating holes in the surface when plotted. Does anyone know why triangulation is creating these holes, and if so, how I can stop it from happening??
>

Use of gridfit is a good choice for the solution.

The nans come about because the triangulation
methods cannot extrapolate beyond the convex
hull of the data, yet you are asking it to interpolate
in that area. So griddata returns a nan there.

John

0 new messages