Find Peaks in an FFT without Signal Processing Toolbox
조회 수: 5 (최근 30일)
이전 댓글 표시
MathWorks Support Team
2017년 10월 10일
답변: MathWorks Support Team
2017년 10월 27일
I have an FFT and I would like to find the peaks but I do not have the Signal Processing Toolbox. I know the 'findpeaks' function does what I want but is there a way to achieve this without the toolbox?
채택된 답변
MathWorks Support Team
2017년 10월 10일
While this may not yield the exact same functionality as 'findpeaks', a new function introduced in R2017b 'islocalmax' should have similar functionality.
https://www.mathworks.com/help/matlab/ref/islocalmax.html
If you take a look at the example below, I have provided some code below that is identical to the first part of the example using 'islocalmax':
https://www.mathworks.com/help/signal/ref/findpeaks.html#bufhyo1-1
load sunspot.dat
year = sunspot(:,1);
avSpots = sunspot(:,2);
m = islocalmax(avSpots);
plot(year,avSpots);
hold on;
plot(year(m), avSpots(m), '*');
'islocalmax' does not have the exact functionality as 'findpeaks' but should suffice in some use cases.
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Get Started with Signal Processing Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!