MartinMcD Posted June 7, 2011 Report Share Posted June 7, 2011 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) Quote Link to comment
GregSands Posted June 7, 2011 Report Share Posted June 7, 2011 Hi Martin -- There's a few solutions you have without purchasing Mathscript! 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. Another way to get a Delaunay triangulation is shown here, using the SceneMesh which is part of the 3D Picture control. 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. Cheers ~ Greg Kriging Interpolation Simple.vi 1 Quote Link to comment
MartinMcD Posted June 16, 2011 Author Report Share Posted June 16, 2011 Hi Greg, Sorry I popped off on holiday before I had chance to reply. Thanks very much for the help and all the information, that's fantastic. I shall have a look this afternoon. Best regards, Martin Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.