find peaks

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

回答 (4 件)

Fangjun Jiang
Fangjun Jiang 2011 年 8 月 31 日

1 投票

If you have noise in the data, you need to filter it first. See:
doc filter

4 件のコメント

mohammad
mohammad 2011 年 8 月 31 日
i funded some code for analog with noise that finds peaks of these waves, but i need these cods for discrete form (matrix)
Fangjun Jiang
Fangjun Jiang 2011 年 9 月 1 日
FILTER is One-dimensional digital filter.
FILTER2 is Two-dimensional digital filter
mohammad
mohammad 2011 年 9 月 1 日
thanks dear Fangjun, in doc filter there is a parameter b=numerator coefficient vector, how must i calculate this?
Fangjun Jiang
Fangjun Jiang 2011 年 9 月 5 日
You don't. That is the parameter to specify your designed filter. See the example in the doc.

サインインしてコメントする。

James Tursa
James Tursa 2011 年 8 月 31 日

1 投票

You might try one of the FEX submissions, e.g. PeakFinder by Nate Yoder:

2 件のコメント

mohammad
mohammad 2011 年 9 月 1 日
dear James thanks for replying
my file is a .xls file. could i send this for you and help how can i use this code for this file?
Fangjun Jiang
Fangjun Jiang 2011 年 9 月 1 日
use xlsread() to read the data into MATLAB workspace first, then apply filter.

サインインしてコメントする。

Honglei Chen
Honglei Chen 2011 年 9 月 1 日

1 投票

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 件のコメント

mohammad
mohammad 2011 年 9 月 1 日
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.

サインインしてコメントする。

Harry MacDowel
Harry MacDowel 2011 年 9 月 5 日

0 投票

Sometimes identifying the noise would be a good start. Try Allan Variance method.
Good luck!

質問済み:

2011 年 8 月 31 日

Community Treasure Hunt

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

Start Hunting!

Translated by