用matlab设计低通滤波器

来源:百度知道 编辑:UC知道 时间:2024/09/21 21:40:39
偶是一菜鸟,刚刚学习数字信号处理,要用matlab设计一个低通滤波器,请问哪位高手会做,给小弟一点指点吧,多谢了,最好是能给出源代码,在下的邮箱是wangxingyue1987@163.com,有什么可以发到我的邮箱里面,谢谢了!!

IIR butterworth的,fdatool产生的:

function Hd = test1
%TEST1 Returns a discrete-time filter object.

%
% M-File generated by MATLAB(R) 7.0.4 and the Signal Processing Toolbox 6.3.
%
% Generated on: 25-Jun-2009 15:15:00
%

% Butterworth Lowpass filter designed using FDESIGN.LOWPASS.

% All frequency values are in Hz.
Fs = 48000; % Sampling Frequency

Fpass = 9600; % Passband Frequency
Fstop = 12000; % Stopband Frequency
Apass = 1; % Passband Ripple (dB)
Astop = 80; % Stopband Attenuation (dB)
match = 'stopband'; % Band to match exactly

% Construct an FDESIGN object and call its BUTTER method.
h = fdesign.lowpass(Fpass, Fstop, Apass, Astop, Fs);
Hd = butter(h, 'MatchExactly', match);

% [EOF]