butter函数的帮助文件里,有这样一个例子:
Design a 10th-order bandpass Butterworth filter with a passband from 100 to 200 Hz and plot its impulse response
代码如下:
n = 5; ?请教一下,n=5还是10?
Wn = [100 200]/500;
[b,a] = butter(n,Wn);
[y,t] = impz(b,a,101);
呵呵,因为看到另一个帮助文件里例子:
Design a 10th-order bandpass Chebyshev Type I filter with a passband from 100 to 200 Hz and plot its impulse response:
n = 10; 有点懵了,不知道以哪个为准
Rp = 0.5;
Wn = [100 200]/500;
[b,a] = cheby1(n,Rp,Wn);
[y,t] = impz(b,a,101); stem(t,y)