LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

interpolation problem with Labview 2009

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.

0 Kudos
Message 1 of 4
(2,484 Views)

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.

0 Kudos
Message 2 of 4
(2,458 Views)

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. 

0 Kudos
Message 3 of 4
(2,439 Views)

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

Message Edited by Kevin_S on 04-12-2010 01:24 PM
0 Kudos
Message 4 of 4
(2,392 Views)