How to limit the frequency range while plotting frequency response of Z transfer function using FREQZ command?

4 次查看(过去 30 天)
Hi all,
I want to plot the frequency response of a comb filter which has notches at the frquencies multiple of 50Hz. I want to plot it within a range of 1Hz to 1 KHz.. The transfer function is as below:
Transfer function.PNG
I am using the following command to plot the frequency response,
fs=10000;
n=5000;
N=202;
for i=1:N
numc(i)=0;
end
for k=1:N
denc(k)=0;
end
numc(1)=150.6;
numc(2)=-150.1;
numc(201)=-150.6;
numc(202)=150.1;
denc(1)=200;
denc(2)=-200;
denc(201)=-109.7;
denc(202)=109.7;
%sys=filt(numc,denc,Tsam)
freqz(numc,denc,n,fs);
I have two questions:
(1) How can i limit the range of the frequency range such that the n evaluation points are within that range.
(2) Best value of n : If n is integer multiple of 512, the plots are smooth, however if not, it looks as if some evaluation points are missing. Some figures attached below:
n_5000.PNG
n_8192.PNG
N_10000.PNG
n_16384.PNG
So how can i plot the frequency response which is smooth over the selected range of frequency. And how do i find the optimum value of n. I appreciate your suggestions in this regard.
Thank you!
Best Regards

回答(0 个)

Community Treasure Hunt

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

Start Hunting!

Translated by