LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

2D interpolation of non-evenly spaced data

I would also like to see an example! 😄
0 Kudos
Message 11 of 21
(5,145 Views)


chilly charly a écrit:





vituning a écrit: ... I'm not too worried about the help, since I am already using the MATL version of griddata in 8.0. I'll try it out and let you know how it works.


Well, I'm not using MatLab and some help would be strongly appreciated ! Could you post an example ?





AG123 ? Vituning ? Anybody else ?
Chilly Charly    (aka CC)
0 Kudos
Message 12 of 21
(5,128 Views)
Well, I found a bug in the LV 8.2 implementation of the griddata command in the MathScript node, and have contacted NI about it, with the data that produces the bug.
 
What kind of example would you like? I can send you something here that I know will work, but unforutantely, the 8.2 bug depends on the data you pass to the function. You may see inconsistent results when compared to the MATLAB implementation of the griddata function.
 
So, I can upload something simple, but I wouldn't recommend suing the LV griddata anyway until the bug is fixed.
 
Maybe one of the NI guys can chime in with the limits of the griddata function, so those who want to use it will know how whether their data will get handled properly.
 
 
0 Kudos
Message 13 of 21
(5,108 Views)
Hey Ya'll,
Here's an example of using Griddata. Post to let me know if it does \ doesn't work for you. Thanks!
 
 
Chris C
Message 14 of 21
(5,105 Views)
I am having problems with the VI.  I can't seem to load MC_griddata.VI.  I currenlty have Labview 8.0, do I need 8.2?  I also have Matlab 7.04, and the Labview code seems to work if I eliminate the Labview graph part of the code.  I am attaching this VI with my data instead of the original.   I would like to use Labview without Matlab if I can? 
 
Also I would to like find the x,y locations at a particular z value once I am done finding the complete 2D surface?  For example, the location when the z value is at half the max (it should be ~ circle shaped).  Does anyone know how to do this using Labview?  Do I have to fit the data to some function first?  I would rather not if I don't have too.  Thanks for any help.
 
kbaker
0 Kudos
Message 15 of 21
(4,838 Views)
Yes, you need LabVIEW 8.20. Everything works fine in 8.2.1 using a Mathscript node.
 

Message Edited by altenbach on 05-28-2007 12:08 PM

0 Kudos
Message 16 of 21
(4,835 Views)
Thanks Altenbach.  The figure you attached looks the same as the Labview VI that I sent before?  I shouldn't need 8.21 if I use the MatLab griddata, just if I want to only use Labview right?  Also, do you know of way to find all of the x,y locations with a specific z value after the interpolation?  Thanks again.
 
kbaker
0 Kudos
Message 17 of 21
(4,823 Views)
Altenbach.  I downloaded 8.2.1, and it seems to work.  Although I tried to use a different method other than 'v4', and it doesn't seem to work.  I am attaching a copy of the most recent attempt.  The stuff before the mathscript is just to make sure that all data after the min value location is zero.  The code seems to work if I replace 'cubic', with 'v4'.  Does anyone know why I can't use a different method?  Thanks. 
0 Kudos
Message 18 of 21
(4,777 Views)
I think your problem is that both the 'linear' and 'cubic' options rely on a Delauney Triangulation, whereas 'nearest' and 'v4' do not.  And the Delauney Triangulation coded for MathScript seems to be buggy - here's its result for your data - notice the crossed lines. So it doesn't seem to perform well if there are large uneven gaps in the location of the nodes.


Message Edited by GregS on 05-29-2007 05:11 PM

0 Kudos
Message 19 of 21
(4,766 Views)

Hi,

 

Has anyone in the know or anyone from NI know if this problem has been fixed / when it is likely to be fixed etc etc.  I have been seeing similar results in some of the Mathscript i have been using.  with the same Input data the following gives me a result of zero, griddata(a,b,c,xi,yi,'cubic')  where as with the same data griddata(a,b,c,xi,yi,'v4' gives me something like what i am expecting.  However for my project cubic is the most suitable (From looking at the results in MatLab) as v4 tends to create data that isnt there or give me some wierd oscillating effects as if it is trying to curve fit to a sinewave or something.

 

In essence, is this fixed? if not does anyone know when it is likely to be fixed?

(I have already Installed the patch which unzips a couple of .dll's to the appropriate folders)

Thanks in advance

Craig

LabVIEW 2012
0 Kudos
Message 20 of 21
(4,617 Views)