필터 지우기
필터 지우기

How do I call the dsp toolbox "peak finder" from code?

조회 수: 1 (최근 30일)
Tianqi Xu
Tianqi Xu 2016년 11월 15일
답변: Puneet Rana 2017년 2월 23일
Hi all,
In dsp toolbox, I created a "SpectrumAnalyzer" system object to monitor the frequency spectrum of my microphone input in real-time. Although I can detect the peak frequencies by "tool menu -> peak finder", I want to use a code to return the peak frequencies directly in the script or command window for further process. Is it possible to do that?
Many thanks, T
  댓글 수: 3
Tianqi Xu
Tianqi Xu 2016년 11월 15일
Thank you for your reply! Actually, I have already checked that page before posting the question, but have trouble implementing it to my case. How do I convert the signal in the time domain (audio streaming from the microphone) into the frequency domain in real-time? Doing a FFT is one way, but it is too much computation for real-time audio processing. I hope I can make use of the built-in peak finder so that no extra computation is needed.
Tianqi Xu
Tianqi Xu 2016년 11월 15일
Thank you for your help! After trial and error, I think I still need to go with the findpeak() function. For future references, this page may also be helpful to d the FFT to the signal in time domain. https://www.mathworks.com/help/matlab/examples/fft-for-spectral-analysis.html

댓글을 달려면 로그인하십시오.

답변 (1개)

Puneet Rana
Puneet Rana 2017년 2월 23일
Hi Tianqi,
You can run findpeaks on the result of dsp.SpectrumEstimator .

카테고리

Help CenterFile Exchange에서 Spectral Analysis에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by