The code above does not evaluate correctly
Sum::itraw: Raw object 2 cannot be used as an iterator.
Sum::vloc: The variable 2 cannot be localized so that it can be
assigned to numerical values.
For a list of values, try FindPeaks
and CrossingDetect
. The latter may not satisfy your requirements.
proofN = proof // N;
peaks = FindPeaks[proofN];
zeros = CrossingDetect[proofN]*Range@Length@proofN // Thread[{#, 0}] & // DeleteCases[{0, 0}];
ListLinePlot[proofN,
PlotRange -> All,
Epilog -> {Red, Point@peaks, Blue, Point@zeros},
ImageSize -> Large]
