How to replicate results as fvtool

I generated a notch filter using the design tool, then generated the magnitude response using the fvtool. Why don't I get the same results when using freqz?
d = fdesign.notch('N,F0,BW,Ast', 2, 0.0667, 0.0023, 30); Hd = design(d); fvtool(Hd);
b = Hd.sosMatrix(1:3); a = Hd.sosMatrix(4:6); freqz(b,a)
Why do the two magnitude plots look different?
Thanks.

답변 (1개)

Honglei Chen
Honglei Chen 2015년 7월 14일

0 개 추천

Are you referring to the difference in null? If so, that's because the fvtool by default uses 8192 points. If you do
freqz(b,a,8192)
You should see similar plots. The scale value does make a difference too, but in your case it's quite close to 1 so they should look approximately the same.
HTH

카테고리

질문:

2015년 7월 14일

답변:

2015년 7월 14일

Community Treasure Hunt

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

Start Hunting!

Translated by