Difference between fvtool and freqz

조회 수: 10 (최근 30일)
Daoyuan
Daoyuan 2014년 2월 27일
댓글: Reza Ghorbani 2019년 1월 18일
Hi,
I am currently using a few notch filters, however a lot of the time I notice different results depending on if I am using freqz or fvtool to plot (eg. the magnitude of fvtool is 10 times or twice that of freqz), I don't seem to understand what is wrong with my code, or if there is any difference between how the magnitude is calculated. code: %======================
close all;
clear all;
wo = 60/(1000/2); bw = wo/35;
[b,a] = iirnotch(wo,bw);
fvtool(b, a);
freqz(b, a);
%======================
Thank you.

채택된 답변

Honglei Chen
Honglei Chen 2014년 3월 3일
There is really not much difference between the two. If you are referring to the differences between the null depths, it is because the two use different default values of FFT points. The default of freqz is a 512-point FFT while for fvtool, it's 8192 points. If you use
freqz(b,a,8192)
You should see similar results.
HTH

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Filter Design에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by