Peak finder - finding major peaks instead of just the smaller ones
9 次查看(过去 30 天)
显示 更早的评论
回答(2 个)
Greg Dionne
2015-4-14
You can do:
findpeaks(y,'NPeaks',5,'SortStr','descend')
This gets you the five with the largest amplitude. If you want the five with the largest prominence, you can do:
[pks,locs,~,prm] = findpeaks(y);
[~,i] = sort(prm,'descend');
plot(1:numel(y),y,'-',locs(i(1:5)),y(locs(i(1:5))),'o ')
1 个评论
Azzi Abdelmalek
2014-1-16
minimum_peak=10 % For example
[pks,locs]=findpeaks(your_signal,'MINPEAKHEIGHT',minimum_peak)
3 个评论
José-Luis
2014-1-16
You could also transform your data prior to detecting the peaks. Maybe a log transform would be enough?
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!