LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Having trouble with Interpolate 1D array

Solved!
Go to solution

Hello,

 

I am new to Labview, and I am having trouble with the Interpolate 1D array function. I have attached a sample vi and some sample data.

 

What I find is that the interpolated y-values produced are just the first n number of y-values input in the array of numbers, where n is the number of y-values required. I am obviously misunderstanding something, but as far as I am aware the array of numbers that I am inputting (in the rawData example file attached) corresponds to a cluster of x and y-coordinates, as shown here: http://zone.ni.com/reference/en-XX/help/371361J-01/glang/interpolate_1d_array/.

 

I have also examined the Labview interpolate example and examined this thread: http://forums.ni.com/t5/LabVIEW/Can-you-give-me-an-example-using-the-vi-interpolate-1d-array-vi/m-p/... but both just deal with fractional indexes rather than x-values.

 

Any help inunderstanding ,y mistake would be appreciated.

Download All
0 Kudos
Message 1 of 5
(3,591 Views)
Solution
Accepted by topic author cohara85

Hi cohara,

 

I guess you want to interpolate Y values (from 2nd column) based on X values (in 1st column).

Try this:

check.png

(It's an Index&BundleClusterArray function inside…)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 5
(3,572 Views)

Thank you GerdW.

 

Is see now what is meant by a cluster.

 

However I am now getting the rror message: 'The type of the source is cluster of 2 elements. The type of the sink is a 1-D array of double.' Does this imply that the interpolate function cannot accept a clustered input? I am using Labview 7.1.

0 Kudos
Message 3 of 5
(3,556 Views)

Hi cohara,

 

did you disable autoindexing on the input tunnel as is shown in my snippet?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 5
(3,548 Views)

Thanks again GerdW,

 

I hadn't disabled autoindexing. It's working now 🙂

0 Kudos
Message 5 of 5
(3,535 Views)