why am i get getting this error "Input to ROOTS must not contain NaN or Inf " when i tried to design a LPF in MATLAB?
13 次查看(过去 30 天)
显示 更早的评论
I want to design a 2 nd order LPF with the following specs:
sampling frequency=200 Hz; cut off frequency 11Hz;
The transfer function is given as: H(z)=(1-2(z^-6)+(z^-12))/(1-2(z^-1)+(z^-2))
The matlab code i wrote is:
fs=200;T=1/fs;fnyquist=fs/2;
fc=11/fnyquist;
fstop=30/fnyquist;
N=2
d=fdesign.lowpass('Nb,Na,Fp,Fst',12,2,fc,fstop);
v=designmethods(d,'type');
opts=designopts(d,'iirlpnorm');
hd=design(d,'iirlpnorm','InitNum',[1 0 0 0 0 0 -2 0 0 0 0 0 1],'InitDen',[1 -2 1]);
freqz(hd);
when i tried to run the code i am getting the error "Input to ROOTS must not contain NaN or Inf ";
why am i getting this error. plz let me know what is the mistake in my code?
0 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Single-Rate Filters 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!