How do I find the right peaks?
1 回表示 (過去 30 日間)
古いコメントを表示
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?
0 件のコメント
回答 (2 件)
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
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
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?
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!