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]]}]]
Thank you for your help! I tried to use your command, but my data has specific numbers. It is the result of another code that computes the differential cross sections, so do you think I can use RandomReal.? I should get stable values of the minima.