Code covered by the BSD License  

Highlights from
PeakSeek

3.66667

3.7 | 3 ratings Rate this file 16 Downloads (last 30 days) File Size: 1.54 KB File ID: #26581

PeakSeek

by Peter O'Connor

 

03 Feb 2010 (Updated 17 Jan 2011)

Find peaks in vector

| Watch this File

File Information
Description

Specify a vecter, a minimum peak separation, and a minimum peak height, and this function will find the peaks.. about 250 times faster than findpeaks would!
try:

t=linspace(0,1,10001);
x=sin(2*pi*20*t)+0.2*sin(2*pi*113*t)+.2*randn(size(t));
p=peakseek(x,10000,1);

MATLAB release MATLAB 7.9 (2009b)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (3)
22 Feb 2010 TideMan

Works well locating peaks in a Fourier spectrum, providing you have smoothed it enough. My only criticism is that the routine only accepts a row vector.

14 Jun 2011 Kevin J. Delaney

Nice work!

19 Jan 2012 Dimitris Kaliakmanis

has same problem as findpeaks...It can't detect peaks that exist at edges of vectors. Such a vector for example is [10 9 8 7 6 5] and the only peak it has is it's first value 10,but neither peakseek nor findpeaks can't detect it

Please login to add a comment or rating.
Updates
17 Jan 2011

works for row or column vector now

Tag Activity for this File
Tag Applied By Date/Time
findpeaks Peter O'Connor 03 Feb 2010 13:23:31
peak Peter O'Connor 03 Feb 2010 13:23:31
local maximum Peter O'Connor 03 Feb 2010 13:23:31
max Peter O'Connor 03 Feb 2010 13:23:31
findpeaks Alex 23 Sep 2011 18:07:52
findpeaks Chang-Soo Kim 06 Nov 2011 18:57:57

Contact us at files@mathworks.com