LabVIEW

cancel
Showing results for
Did you mean:

Solved!
Go to solution
Highlighted

Interpolating 1D XY data not working properly in my sample VI

Hi Friends,

I need to interpolate XY data acquired from a data acquisition device, the interpolate 1D VI  just takes the nearest value instead of interpolating it, see the attached code.

The 1D XY data is produced using a square of iteration (Y) and the time (t) at which the Y is obtained. The time interval is 0.2s for data generation and a 50 ms is added for the XY data interpolation. So, the raw data is

(t1, Y1), (t2, Y2), .... (tn, Yn), where Y = i*i, i is the iteration.

The interpolated data should be

(t1+0.05, Y1'), (t2+0.05), Y2'), .... (tn+0.05, Yn'),

Currently, Yi' = Yi, which is not what I expected.

Could someone help with this issue?

Thanks,

Gu

Message 1 of 13
(265 Views)

Re: Interpolating 1D XY data not working properly in my sample VI

Read the help for "interpolate array". Your code makes very little sense.

LabVIEW Champion. It all comes together in GCentral
Message 2 of 13
(254 Views)
Solution
Accepted by topic author edmonton

Re: Interpolating 1D XY data not working properly in my sample VI

Try this....

LabVIEW Champion. It all comes together in GCentral
Message 3 of 13
(240 Views)
Solution
Accepted by topic author edmonton

Re: Interpolating 1D XY data not working properly in my sample VI

LabVIEW Champion. It all comes together in GCentral
Message 4 of 13
(239 Views)

Re: Interpolating 1D XY data not working properly in my sample VI

Using the 2D Interpolation makes this all much easier.

—Ben
Prevent your computer from sleeping programmatically!
Use Power Requests

Message 5 of 13
(229 Views)

Re: Interpolating 1D XY data not working properly in my sample VI

How is that 2-D interpolation?

The VI is called "Interpolate 1D.vi".

Message 6 of 13
(225 Views)

Re: Interpolating 1D XY data not working properly in my sample VI

@Ben_Manthey wrote:

Using the 2D Interpolation makes this all much easier.

Your VI is using "interpolate 1D" though.

(also, if you look inside, it is using a scary amount of code to do the same, so it is only simpler on the surface )

LabVIEW Champion. It all comes together in GCentral
Message 7 of 13
(223 Views)

Re: Interpolating 1D XY data not working properly in my sample VI

Hi  Dr Altenbach,

Thanks a lots.

Gu

Message 8 of 13
(198 Views)

Re: Interpolating 1D XY data not working properly in my sample VI

Hi Ben,

Thank you for your response. My LV is 2015 can not open the vi, Could I trouble you to save your VI to 2014 or 2015 version and upload it again?

Regards,

Gu

Message 9 of 13
(194 Views)

Re: Interpolating 1D XY data not working properly in my sample VI

@edmonton wrote:

My LV is 2005 can not open the vi,

Actually, you have LabVIEW 2015. (There is no LabVIEW 2005)

LabVIEW Champion. It all comes together in GCentral
Message 10 of 13
(181 Views)