Borrar filtros
Borrar filtros

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

1 visualización (últimos 30 días)
Tianqi Xu
Tianqi Xu el 15 de Nov. de 2016
Respondida: Puneet Rana el 23 de Feb. de 2017
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 comentarios
Tianqi Xu
Tianqi Xu el 15 de Nov. de 2016
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 el 15 de Nov. de 2016
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

Iniciar sesión para comentar.

Respuestas (1)

Puneet Rana
Puneet Rana el 23 de Feb. de 2017
Hi Tianqi,
You can run findpeaks on the result of dsp.SpectrumEstimator .

Etiquetas

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by