I'm looking for an efficient way of extracting the first element after the first sequence of N consecutive elements in which the values are increasing. If these are the data of a toy example:
data = {{1, 4}, {2, 3}, {3, 4}, {4, 5}, {5, 6}, {6, 4}, {7, 6}, {8, 3}, {9, 4}, {10, 5}, {11, 6}, {12, 7}, {13, 8}, {14, 9}, {15, 10}}; and I would like to get the first element after the first sequence of 5 consecutive increasing values (from those in second position), I should obtain the row {13,8}.
I was playing around with:
Split[data, #2[[2]] > #1[[2]] &] that groups my data in sequences of increasing values, but I wasn't able to find a way to add the additional constraints I need. Any hint is much appreciated.
{8,3}->{9,4}->{10, 5}->{11,6}->{12, 7}->{13,8}, so the row after is{14, 9}? $\endgroup${13,8}. $\endgroup${13, 8}you had{13, -8}would that row be your result? $\endgroup$