I have a long data (795,000 rows). For every 5000 rows I need the minimum and the position of this minimum. Then I will get 159 minima with their positions. I tried to create a loop to calculate these minima, but I didn't find a correct way. If my data is dd What should I do to correct this
mini[i_] := Min[dd[[i ;; i + 5000]]]
pos[i_] := Position[dd, mini[[i]]]
minima = {}
For[i = 1, i <= Length[dd], i + 5000,
AppendTo[minima, {mini[[i]], pos[[i]]}]]
Thanks in advance.