I am trying to compare numbers in two different lists to see if 2 subjects started the same action within 10 seconds of eachother. For example, I have one list of numbers
and another list
What I would like to do is see if any number in list 2 is within 10 seconds of any number in list one.
For example, 420 and 414 are within 10 seconds of eachother, so I would like to take these numbers and mark the index of each number in its respective list.
The goal is to get the indexes I need for each list individually, and remove all of the other rows of each list seperately so only the correct numbers remain. In the above example the new lists would be:
420 and 414
The goal is for both lists to be the same length in the end. The data I am using here is time, so there is no chance of a number occuring more than once, and numbers are always in ascending order.