File Exchange

## PeakSeek

version 1.2.0.0 (1.54 KB) by Peter O'Connor

### Peter O'Connor (view profile)

Find peaks in vector

Updated 17 Jan 2011

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);

Kevin Nzeyimana

### Kevin Nzeyimana (view profile)

Thank you for your file, Indeed it gives the same results as findpeaks (in my case) and it is much faster ! Great !

RU LI

Jennifer Popp

### Jennifer Popp (view profile)

Jorge Pena Arancibia

changseop kwon

### changseop kwon (view profile)

peakseek is faster than findpeaks 3 times! Nice!!!

Egemen Karabiyik

Myrtle42

### Myrtle42 (view profile)

Peakseek takes 0.45 s v. 11.27 s for findpeaks, using the same dataset (20716944 x 1 single). 5 stars!

Jey

mlmasmoudi

zxl333

### zxl333 (view profile)

why the number of input parameters is insufficient in my matlab?

John McDowell

Zhaolin Liu

### Zhaolin Liu (view profile)

Great job!Doing exactly what I expected!

Mahmoud Hassan

### Mahmoud Hassan (view profile)

Excellent job.
Very efficient and reducing the calculating time by order of magnitude compared to findpeaks function.

Mathieu

### Mathieu (view profile)

Nice job! So much faster than findpeaks. Findpeaks = 1000 lines of code, you 30 for the same results (in my case).

Dimitris Kaliakmanis

### Dimitris Kaliakmanis (view profile)

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

Kevin J. Delaney

Nice work!

TideMan

### TideMan (view profile)

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.