Jump to content

Uneven 2D Interpolation - GridData and MathScript


Recommended Posts

Hello there,

I want to do some 'uneven' 2d interpolation and from my searches on the web/forum it seems that the way around it is to use the griddata() function in Matlab. Now, this creates the issue of my Matlab-using colleagues have a great time at my expense that I can't do it in native LabVIEW but I can live with that.

http://digital.ni.com/public.nsf/allkb/d97af9ecd0236d6f862571d9005ea79f

The question is - before I buy MathScript RT I to access a single function I was wondering if anyone knows of another solution?

Thanks very much,

Martin

(LV 2010)

Link to comment

Hi Martin --

There's a few solutions you have without purchasing Mathscript!

  1. There is an old library called Tripolation - found here. It computes a Delaunay triangulation and interpolates from that, however will not extrapolate outside the convex hull of your data points.
  2. Another way to get a Delaunay triangulation is shown here, using the SceneMesh which is part of the 3D Picture control.
  3. I've implemented a simple version of Kriging interpolation, which has the advantage of working in 2D or 3D, and of being able to extrapolate (with the usual caveats). In the attached code, note that the Kriging Weights would only need to be computed once for any given geometry, and the interpolation quickly updated for changes in data point values. More complex interpolations can be obtained by modifying the weights on the distances, for example to use a Gaussian or exponential weighting.

post-3889-0-64543400-1307485082_thumb.pn

Cheers ~ Greg

Kriging Interpolation Simple.vi

  • Like 1
Link to comment
  • 2 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.