フィルターのクリア

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 Center および File ExchangeSpectral Analysis についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by