LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

intersection points

hello. I'm looking for a solution for this problem: There are two continuous graphs which are plotted and displayed in one graph indicator. Now, what I need are all intersection points stored in an own array. Is there a way to manage this problem in LabVIEW 7.1?
 
Please help me. THX!
0 Kudos
Message 1 of 7
(3,913 Views)
i don't see a function in LV that you can find the intersection...
if you can't find one either, try using a loop to get the intersection yourself
depending on the size of the array, this might be slow
0 Kudos
Message 2 of 7
(3,900 Views)
Elsa's approach will not work if the intersection is not an exact equality. For example if you had arrays representing two (non-parallel) straight lines which intersected between ponits in the array the equality test would not find it.

A shift register and a subtraction might work. If the sign of the difference between the arrays changes between elements [i] and [i+1], the intersecton is also between those elements. I have not tried this nor thought it through carefully, so it may not work in all cases. For signals which intersect multiple times {sin(x), cos(x)} the result will be an array of intersections.

Lynn
0 Kudos
Message 3 of 7
(3,893 Views)

Just like float comparisons, you will not get an exact match but you can get "intersections by setting the distance between points to be less than some minimum value.  also depending on the functions, you might beable to solve the equality equations and find the zero points.

 

Paul

Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
0 Kudos
Message 4 of 7
(3,891 Views)

Just like float comparisons, you will not get an exact match but you can get "intersections by setting the distance between points to be less than some minimum value.  also depending on the functions, you might beable to solve the equality equations and find the zero points.

 

Paul

Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
0 Kudos
Message 5 of 7
(3,890 Views)
you can autoindex one array and call search 1D array function within
For loop.
It's true that speed depends upon array size, but seems from your
attachment that by autoindexing both arrays you only compared the
numbers with SAME index in two arrays, is that what you called
intersection?

Chenny Zhenyu Wang
Certified LabVIEW Architect
Certified TestStand Architect
0 Kudos
Message 6 of 7
(3,875 Views)

One other method of finding intersections is to use a crossover analysis (assuming 2 functions are continuous), that is given a pair of points from each graph if the first point of graph A (X11, Y11) is greater than the first point of graph 2 (X21, Y21) but the case is flipped in the second point (X12, Y12) vs (X22, Y22) the there must be a crossover (intersection) between them, interpolation might give you a better guess at the exact location.

 

Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
0 Kudos
Message 7 of 7
(3,869 Views)