How do I find the right peaks?
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
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 comentarios
Respuestas (2)
Image Analyst
el 24 de Jul. de 2014
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 comentarios
Wayne King
el 24 de Jul. de 2014
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
el 24 de Jul. de 2014
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?
Ver también
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!