How can I identify the amplitude peaks from an FFT?

조회 수: 5 (최근 30일)
Gabriel Magalhães
Gabriel Magalhães 2021년 11월 23일
댓글: Gabriel Magalhães 2021년 11월 24일
The code that I did shows the audio with FFT, now I'm trying to make a function that counts the number of significant frequencies of the chart:
I still don't have much experience with MATLAB, so I need some help to identify these peaks with a code

채택된 답변

Chris
Chris 2021년 11월 23일
편집: Chris 2021년 11월 23일
You can use findpeaks, probably with some additional parameters. For instance, if the plotted signal is P:
Z = findpeaks(P,'MinPeakHeight',5);
numPeaks = numel(Z);
See the findpeaks documentation if you need to supply additional criteria as to what counts as a peak.
If you call the function without assigning it to an output, the function will create a plot like you've posted.
findpeaks(P,'MinPeakHeight',5)

추가 답변 (0개)

카테고리

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