I have a noisy periodic signal in Matlab that I've extracted peaks from with the help of [peak loc]=findpeaks(signal)
. However unrealistic outliers are also inside the peak
array.
I set min- and max-values for peak
and so get a shorter peak
array. Now I would love to mark this shorter subset of original peak
into the original plot(loc,peak)
, whereat I'd get an error, since loc
has kept its original length.
My questions:
Is there a way in the fashion of a container.map or something similar that allows to adapt
loc
topeak
with consistence of the loc-peak assignments?- How can I alternatively plot the shortened
peak
array onto the original signal plot?
- How can I alternatively plot the shortened
Thanks a lot!