I want to select the max/min value after a certain time interval. Something similar to sliding or rolling window but calculating the max/min values in section. Here an example [6 3 7 4 6 9 2 6 7 4 3 7 8 2 5 4 1 7 5 1]. In this instance I want the window to calculate the max of the first 5 values and then the max value from the next section (index 6 to 10) and so on.
select a max value 7 from this portion [6 3 7 4 6]
select a max value 9 from this portion [9 2 6 7 4]
select a max value 8 from this portion [3 7 8 2 5]
select a max value 7 from this portion [4 1 7 5 1]
Any ideas on how to do it. Some sort of function that allows me to adjust the window length as well, i.e for 5 to 3. Thanks in advance