LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Can you give me an example using the vi, interpolate 1d array.vi

Hi

I am having trouble using interpolate 1d array. Is it possible for you to give me an example of how it is used?

Thank you.
0 Kudos
Message 1 of 3
(10,124 Views)
Not sure about what you are looking for.

Let us assume that you have an array containing Y values 1, 2, 5, 10, 17, 26.
The basic idea is that there is a continuous (but unknown) relationship between the index values, and the corresponding table values.
So, what would be the Y value corresponding to i = 2.5 ?
Or, what would be the i value corresponding to Y = 3 ?

That's were the interpolating tools come to the scene :

With the "Interpolate array" function, you pass the fractionnal i value, and you get the Y value, calculated from a LINEAR interpolation between the table points. Here, for i = 2.5, the Y value is half-way between 5 and 10 = 7.5. Remember that this is a linear approximation. In this example, the unknown function was obviously Y = i^2 + 1. So, for i = 2.5, the true solution was 7.25. Not far from the linear interpolation, but not equal either.

With the "Treshold 1D array" function, you pass the Y value and you get the corresponding i fractionnal index. Y = 3 is 1/3 between Y = 2 and Y = 5, so i = 1.3333... The validity is the same : linear approximation (what was the true solution here ?). Beware, this function works only with Y values arranged in ascending order.

There are other interpolating vis in the "Mathematics" subpalette, which use more elaborate strategies.

Hope this helps...

CC
Chilly Charly    (aka CC)
Message 2 of 3
(10,104 Views)
TUDS;

Check the following example: Threshold 1D Array Example.

You can search the example library for interpolation and similar terms.

Regards;
Enrique
www.vartortech.com
Message 3 of 3
(10,060 Views)