Closed jefferis closed 2 months ago
https://github.com/gjmvanboxtel/gsignal/blob/0fbb9b185a353df081a46e604f14a8eee6c5ca36/R/findpeaks.R#L173
This should be
if (any(D<MinPeakDistance)) {
because otherwise it is just checking if D has some positive values rather than comparing distances with MinPeakDistance.
MinPeakDistance
Compare with the corresponding line in octave
https://sourceforge.net/p/octave/signal/ci/default/tree/inst/findpeaks.m#l205
if (any (D(:) < minD))
https://github.com/gjmvanboxtel/gsignal/blob/0fbb9b185a353df081a46e604f14a8eee6c5ca36/R/findpeaks.R#L173
This should be
because otherwise it is just checking if D has some positive values rather than comparing distances with
MinPeakDistance
.Compare with the corresponding line in octave
https://sourceforge.net/p/octave/signal/ci/default/tree/inst/findpeaks.m#l205