06-12-2017 03:37 AM
Hello everyone!
I am trying to build a script that finds the intersecting points.
If you look at the "Example.png" image, you can see that I have 2 random curves.
I want to find the intersecting points and plot them.
Thus, in the report I save "automatically", I want to have both my original curves, and markers at the intersections.
I thought this would be easy if I can use something from the "Event Search", but I am stuck with finding the right conditions.
[I was expecting to get the points where designators A & B were equal to each other(A=B) would give me the x-coordinates of when the intersections occur]
I've looked though other threads, but I couldn't find what I want...
Any advice would help me greatly!
Thank you in advance, and I will not forget kudos!
Solved! Go to Solution.
06-12-2017 07:28 AM
Hello kmyan9
If you compare A and B whether they are equal, then both values have to be exactly the same. For measured values this is not very often the case.
So, it is better to use >=. In the result of the channel event function, are the Start-Index the values you are looking for.
Greetings
Walter
06-12-2017 08:11 AM
Hey Walter!
Thank you for your suggestion!
I did realize that A & B can almost NEVER be equal just before you posted you response.
Then I just managed to get it, and will post my solution for future reference.
I subtracted the two graphs, found the range at where the difference was a very small value (ex. 0.5)
Then multiplied it with the smaller graph to get another "final channel"
Then used the calculator to do
"Ch("Final") = IIF(Ch("EventStatus") = 0, NoValue, Ch("Multiplied"))
and got the result that I attached as "got it.png"
Thanks for the help Walter hope you have a good day!