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 CenterFile Exchange에서 Descriptive Statistics에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by