How do I find the right peaks?

1 回表示 (過去 30 日間)
Orville
Orville 2014 年 7 月 24 日
コメント済み: Image Analyst 2014 年 7 月 24 日
I need to find the two peaks that are shown below in red. The graph on the left is a periodogram.
I tried to do smoothing using the pwelch('Tukey') method (shown to the right of the periodogram), but I only get one peak in the area from 100 to 400 hz rather than the two peaks. I've tried other smoothing methods as well, with similar results. Any suggestions?

回答 (2 件)

Azzi Abdelmalek
Azzi Abdelmalek 2014 年 7 月 24 日

Image Analyst
Image Analyst 2014 年 7 月 24 日
Use findpeaks in the Signal Processing Toolbox. But since you did not say how general this must be and how varied the data are, you can get then for just the specific signal you gave by saying
% Find indexes of peaks around 130, 320, and 800
[~, indexesOfPeaks] = find(yourSignal > someValue);
indexesOfPeaks(indexesOfPeaks>400) = []; % Eliminate any peaks with x>400
I don't know what someValue is because you did not show the values along the Y axis.
  3 件のコメント
Wayne King
Wayne King 2014 年 7 月 24 日
Do you have a priori knowledge about what part of the frequency range you want to limit your search to? Can you attach your time data along with the sampling frequency
Image Analyst
Image Analyst 2014 年 7 月 24 日
Your peaks are extremely narrow (if you want those two precise thin lines you pointed to) so any smoothing will obliterate them. If you just want kind of the centroid of the hump, then you can smooth them, say with sgolayfilt() in the Signal Processing Toolbox, which find peaks is also in. Do you have that toolbox?

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

カテゴリ

Help Center および File ExchangeDescriptive Statistics についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by