Butterworth filter

6 ビュー (過去 30 日間)
federico valenti
federico valenti 2011 年 6 月 8 日
Hi! I need a butterworth filter 4th order with 0.1Hz and 25Hz frequencies for 200 Hz sample rate function
i typed: rate =200;
f1=0.1;
f2=25;
order=2; % in the butter specific it says If Wn is a two-element vector, Wn = [W1 W2], BUTTER returns an order 2N %bandpass filter with passband W1 < W < W2.
B = butter(order,[f1/(rate/2) f2/(rate/2)]);
is it correct? How can i draw the butterworth's graph? with plot(B)?
TY sooooooooo much

採用された回答

Honglei Chen
Honglei Chen 2011 年 6 月 8 日
Hi Federico,
Butterworth filter is an IIR filter, so you will need to get the denominator too, i.e., using the syntax
[B,A] = butter(order,[f1/(rate/2) f2/(rate/2)]);
There are several ways you can visualize the response. I would recommend to use fvtool, e.g.,
fvtool(B,A)
You can also do
freqz(B,A)
if you want.
HTH,
Honglei
  3 件のコメント
Honglei Chen
Honglei Chen 2011 年 6 月 13 日
Yes. Note that filter works on columns of matrixToFilter. You can find more details if you type
>> doc filter
federico valenti
federico valenti 2011 年 6 月 14 日
Thanks a lot

サインインしてコメントする。

その他の回答 (0 件)

Community Treasure Hunt

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

Start Hunting!

Translated by