LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Interpolate only some area of points.

I have two arrays (2000 points each) and i need to find the intersection point between them. I interpolated both arrays, but my project works with real acquisition and i want to interpolate only the neighborhood of the intersection point. For example, two arrays with 2000 points have an intersection point, so is of my interest interpolate, let suppose, an intervale of 50 points in neighborhood.
I attached my program idealized (Labview 6i). Thank you.
0 Kudos
Message 1 of 3
(2,645 Views)
You can monitor the streams of data for which set is greater, when they switch, you have an intersection.

Then, depending on your needs, you can just interpolate the 2 points on either side of the intersection for the location of the intersection.

Attached is an example of this using data stored in two arrays (based on your vi). If one were to monitor the data streams "live" it would look a tad different.

Good luck.
0 Kudos
Message 2 of 3
(2,645 Views)
I am having a hard time trying understand what your VI does but I do have a few comments.

It appears that you want to use the polynimial fit to predict the values of the plot between the data points. With the two polonomial plots you can then caluculate a predicted intersection of the plots. Additionally, you want to reduce the overall calculations by having the polynomial fit work on a smaller subset of the original array data. The trouble in doing this is that in order for the polynomial fit to work well, it needs several data points. If you consider the extreme case of just two data points, the only reasonable interpolation you could make is linear.
I have not dug into the guts of polynomial fit, so I cannot comment on its complexity. What I
recommend is to take the difference of the arrays, convert the array to an array of signs, search for changes in the sign and build an array of points where the intersections occur. With this info you can extrapolate the intersection with some basic algebra.

I have revised and attach your VI below. I forgot and worked on the VI in 6.1 and saved for previous. I hope you can open it without problems.

Jeremy
0 Kudos
Message 3 of 3
(2,645 Views)