How Stopband attenuation and passband attenuation can be calculated ????

Answers (1)

If you already have a filter and you want to calculate the components of its Bode plot (frequency response), use the freqz function with two outputs:
[h,w] = freqz(b,a,n)
You can then calculate the response as a function of frequency and calculate the response in dB.
If you want to design a filter with specific passband and stopband attenuation characteristics, it is easiest to use the dfilt or designfilt functions. (Look through the documentation and choose the one that works best for you.) They will allow you to design both FIR and IIR filters to your requirements.

2 Comments

Can you explain it in brief,
I already have a bandpass filter optimised using PSO ,Now i want to calculate the maximum stopband attenuation, how can i do it
Do you get this method @Danish khan. If yes then please explain me how to calculate the stopband attenuation of our filter.

Sign in to comment.

Asked:

on 6 Jul 2016

Commented:

on 18 May 2022

Community Treasure Hunt

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

Start Hunting!