Nice job osorico. That was very efficient.
Ok, so I've got one I'm stumped on. It seems very simple, but I just can't seem to get it.
I have an index of say 100 values, call
it data(100).
I want to step through the index with a sliding window and find the maximum of prior 10 values. i.e.
max(10)=maximum of index 1-10
max(11)=maximum of index 2-11
.
max(99)= maximum of index 89-99
max(100)=maximum of index 90-100
This is so easy to do with ranges. But, when I use array elements, it seems difficult. Can you or anyone else come up with a loop to do this? Thanks.
btw max(1) to max(9) can just be 0
Ok, so I've got one I'm stumped on. It seems very simple, but I just can't seem to get it.
I have an index of say 100 values, call
it data(100).
I want to step through the index with a sliding window and find the maximum of prior 10 values. i.e.
max(10)=maximum of index 1-10
max(11)=maximum of index 2-11
.
max(99)= maximum of index 89-99
max(100)=maximum of index 90-100
This is so easy to do with ranges. But, when I use array elements, it seems difficult. Can you or anyone else come up with a loop to do this? Thanks.
btw max(1) to max(9) can just be 0
