I have two lists:
lst1 = {4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2}; lst2 = Range[0.1, 10, 0.1]; How can find the interval from lst2 for each integer number in lst1?
For example, lst1 starts with integer 4 corresponding to 0.1 (first element in lst2), and it repeats 30 times. Then the 30th element in lst2 (which is 3) should match with the last 4 in lst1. So, the interval of interest for this example is {4, [0.1, 3]}, meaning that 4 remains constant in the range [0.1, 3]. I have a very long list about 10000 of monotonically increasing positive numbers in lst2 and a limited number of integers, positive but not necessarily monotonically increasing.