LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

I need the intersection of two data arrays, and plot the tangent of X , not Y.

I need to find the intersection point(s) os two 1-D arrays (2048 points each) and extract the tangent of X. But i´m not finding the intersection x value. After do that, i will use the process to acquire real time data. How can i make that faster and so optimize my experience? Thank you.
0 Kudos
Message 1 of 2
(3,180 Views)
msbalen,

I'm assuming the data you are collecting doesn't come out to be a linear,
straight line otherwise you wouldn't want the tanget. The way I
remember doing it in my calc class was to get the equation of the two
lines into some form of a polynomial and then set them equal to each
other. Then you solve for X. Then you take the derivative of one of the
equations and set it equal X .... gets a little fuzzy here. Perhaps someone
else can help with this.

However, if you want to speed up finding the intersection, one way could
be to simply subtract the array from each other and search for when the
data is close to or equal to zero. Do the search in both directions to
return a low and high index. Then just interpolate for some middle index
value. This is s
loppy but it could be faster than building an equation for each
line. This still doesn't explain how you'd get the tangent of X.

I'm sure there's a better method. Do you have access to Matlab? Labview
is supposed to work great with Matlab's scripts.

-kevin

> I need to find the intersection point(s) os two 1-D arrays (2048 points
> each) and extract the tangent of X. But i´m not finding the intersection
> x value. After do that, i will use the process to acquire real time
> data. How can i make that faster and so optimize my experience? Thank
> you.
0 Kudos
Message 2 of 2
(3,180 Views)