swa-matlab icon indicating copy to clipboard operation
swa-matlab copied to clipboard

swa_get_peaks fails to handle a special case

Open grahamfindlay opened this issue 8 years ago • 0 comments

Checking for negative and positive peaks this way...

MNP  = find(diff(sign(slope_data)) == 2);
MPP  = find(diff(sign(slope_data)) == -2);

...fails to properly handle the case where the slope at the peak is exactly zero.

E.g. it catches peaks like / but misses peaks like _/.

grahamfindlay avatar Feb 04 '16 21:02 grahamfindlay