# find peaks

6 views (last 30 days)
mohammad on 31 Aug 2011
does anyone know, is there code for finding peaks in a matrix that have noise? (because of this noise i cant use findpeaks command in matlab) the noise has so small amplitude in compared with amplitude of main wave. thanks
##### 0 CommentsShow -1 older commentsHide -1 older comments

Sign in to comment.

### Answers (4)

Fangjun Jiang on 31 Aug 2011
If you have noise in the data, you need to filter it first. See:
doc filter
##### 4 CommentsShow 3 older commentsHide 3 older comments
Fangjun Jiang on 5 Sep 2011
You don't. That is the parameter to specify your designed filter. See the example in the doc.

Sign in to comment.

James Tursa on 31 Aug 2011
You might try one of the FEX submissions, e.g. PeakFinder by Nate Yoder:
##### 2 CommentsShow 1 older commentHide 1 older comment
Fangjun Jiang on 1 Sep 2011
use xlsread() to read the data into MATLAB workspace first, then apply filter.

Sign in to comment.

Honglei Chen on 1 Sep 2011
Hi Mohammad,
Can you explain why you cannot use findpeaks? I think you can specify MinPeakHeight to avoid false alarm from the noise.
Thanks.
##### 1 CommentShow NoneHide None
mohammad on 1 Sep 2011
hi dear Hongle,thanks for replying
when i use findpeaks, because of noise it gives me 1000 peaks but the matrix has only 5 0r 10 desire peaks, and when i want to sort these peaks and gather 5 or 10 biggest at the first of sorting, again because of noise it gives the biggest peaks and some values (for 4 or 9 others peaks) around that biggest peak. i designed some filters for this but aren't accurate. i saw some nice codes for finding peaks of analog signals with noise but my data is in matrix and discrete form. i think there are some accurate codes for matrix form, saving my time.

Sign in to comment.

Harry MacDowel on 5 Sep 2011
Sometimes identifying the noise would be a good start. Try Allan Variance method.
Good luck!
##### 0 CommentsShow -1 older commentsHide -1 older comments

Sign in to comment.

### Categories

Find more on Descriptive Statistics in Help Center and File Exchange

### Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!