I'm using Matlab's findpeaks
function for finding local maxima's in a 1d array. My aim is to count the number of maximas, and that's where I encounter problems.
findpeaks()
is just too sensitive. For instance, try this
v=[3.6107,3.6109, 3.6110,3.6110, 3.6108, 3.6107,3.6105, 3.6105, 3.6105,3.6106,3.6108,3.6109,3.6109, 3.6108,3.6105,3.6100,3.6094,3.6087,3.6080, 3.6073, 3.6067, 3.6062,3.6058,3.6053,3.6048,3.6041,3.6032,3.6021,3.6008,3.5993,3.5977, 3.5960,3.5942,3.5925,3.5907,3.5889,3.5869,3.5846,3.5820,3.5789,3.5753];
[maxvals, maxind] = findpeaks(v)
And you'll get a number of maximas, while this is obviously just a numerical artifact, and not the actual number of maximas.
How would you suggest to relax the parameters so I'll get a better result?
In Matlab 2014 there is a MinPeakProminence
parameter that should solve the issue, but it doesn't seem to work in 2013a. Any ideas?