LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

interpolate gives wrong valueswhen switching from v8.6 to v8.5

Solved!
Go to solution
I have copied my code that I built in 8.5 to 8.6. The code all works well in 8.5 but in 8.6 I found that the interpolate 1D.vi is giving me bogus numbers of interploated values. I checked that the inputs of the function are the same in both versions (8.5 and 8.6) and they checked as equal. However the output yi is wrong in 8.6. I also checked the method of the function and they are the same. Any clue why this is so?
0 Kudos
Message 1 of 6
(2,360 Views)
Please post your code with some saved values so someone else can verify this.
0 Kudos
Message 2 of 6
(2,341 Views)
The test.vi is written in v8.6. The corresponding output files are labeled out 8.5 for v8.5 and out 8.6 for v8.6. The correct values are with v8.5. v8.6 gives incorrect values.

Thanks for your attention to this issue
Download All
0 Kudos
Message 3 of 6
(2,334 Views)
Solution
Accepted by topic author justinclouds
The problem is that your arrays contain NaNs. If you chop off the arrays before the NaNs then the interpolate works correctly. I do not know what was changed with the operation of the Interpolate 1D Array VI between 8.5 and 8.6.
Message 4 of 6
(2,309 Views)
Thank you for this reply. This is the correct solution. The NaN values have to be removed. The NaN values are an important property in my code as they are generated by other code that removes undesired values. I inserted the ogtk filter 1D array and removed the NaN values. The code now works. The interpolate 1D vi did change from v8.5 to v8.6 in its property how to handle NaN values.
0 Kudos
Message 5 of 6
(2,301 Views)

justinclouds wrote:
I inserted the ogtk filter 1D array and removed the NaN values. The code now works.

If your NaN values are all at the end then all you need to do is do use Search 1D Array to find the NaN and then use Array Subset to just get all the elements before that index. 

0 Kudos
Message 6 of 6
(2,296 Views)