04-08-2010 03:23 PM
Hello!
I have a program which works fine in Labview 8.5. But in Labview 2009 I see different results from interp 1d function. The problem is as follows: X, Xi and Y arrays have the same length with some real data points and the rest is NaN. "interp 1d" in Labview 2009 generates Yi as [NaN, y, y, y...] where y is a real number.The same code works fine in Labview 8.5.
Thanks for the suggestions in advance.
04-08-2010 05:45 PM
I can confirm what you're seeing. Not sure if it's a bug or not. I thought there was some discussion a while back about NaN with interpolation, but I can't seem to find the discussion.
What you will need to do is to split the arrays to remove the NaNs.
04-09-2010 09:03 AM
I had seen that previous thread; the solution is about arrays having the same length which is the case here.
There are many arrays in the program and splitting them is not easy. The strange fact is that the the same "interp 1d" works fine in Labview 8.5. I just upgraded to Labview 2009, and wonder if these are some bugs of the 2009 version, or the problem lies somewhere else.
04-12-2010 01:22 PM - edited 04-12-2010 01:24 PM
rayt,
From my brief research, it appears that the behavior changed slightly between LabVIEW 8.5 and 8.6. However, there appears to be no documentation related to this difference in behavior. This was reported to R&D (# 219679) for further investigation. At the very least, there should be more documentation on this change of behavior.
In my search, I did find a reference to this example program (Remove NaN in a 2D Array). Use it if it's helpful in your case.
Kevin S.
Applications Engineer
National Instruments