How to find the average of peaks in a noisy signal?
10 views (last 30 days)
Show older comments
I want to find the average values of peaks on my signal. Only using the function "findpeaks()" won't work because its a very noisy signal.
4 Comments
Image Analyst
on 30 Jul 2018
Did you try my solution below? Did you even scroll down and see it? I believe it should work. If you attach your data in a .mat file, and explain exactly what the ambiguous "average of peaks" means, I can try it.
Answers (1)
Image Analyst
on 30 Jul 2018
To find the average value of all the peaks, why not simply mask and use mean()?
mask = signal < -0.3;
meanValue = mean(signal(mask))
If you need the mean value of each peak individually, use regionprops():
props = regionprops(mask, signal, 'MeanIntensity');
meanValues = [props.MeanIntensity];
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!