How do I get a magnitude respons with frequency at the x-axis?

4 vues (au cours des 30 derniers jours)
Joakim Hansen
Joakim Hansen le 19 Oct 2017
Commenté : Star Strider le 20 Oct 2017
When I use the function freqz() I'll get a response with normalized frequency at the x-axis. Is there a way to get the freqency instead or optionally calculate it by hand?

Réponse acceptée

Star Strider
Star Strider le 19 Oct 2017
Yes!
Supply the sampling frequency (here ‘Fs’) as an argument to freqz to get the plot in terms of actual frequency (from 0 Hz to the Nyquist frequency), where ‘NFFT’ is the length of the Fourier transform you want to use (a good choice being 2^16):
freqz(sos, NFFT, Fs)
or:
freqz(b, a, NFFT, Fs)
or others, depending on how you implemented your filter.
  2 commentaires
Joakim Hansen
Joakim Hansen le 20 Oct 2017
Thank you!
Star Strider
Star Strider le 20 Oct 2017
As always, my pleasure!

Connectez-vous pour commenter.

Plus de réponses (0)

Tags

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by