Path: news.mathworks.com!not-for-mail
From: "Ana " <filter_world@yahoo.com>
Newsgroups: comp.soft-sys.matlab
Subject: Obtaining the frequency response from a digital filter
Date: Sun, 8 Nov 2009 10:18:01 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 26
Message-ID: <hd65so$6b7$1@fred.mathworks.com>
Reply-To: "Ana " <filter_world@yahoo.com>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1257675481 6503 172.30.248.37 (8 Nov 2009 10:18:01 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Sun, 8 Nov 2009 10:18:01 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 2075319
Xref: news.mathworks.com comp.soft-sys.matlab:583311


Hi there, 

I am converting from analog to digital filter, a butterworth using the bilinear transformation. I am obtaining the num and the den of the digital function, but when am plotting using freqz the response is not as desired. don t know if i am doing something wrong prior to freqz or that freqz is not the right command to plot for digital filters. 

disp(' --------------------------------------------');
disp('| Design of a Digital 2nd order Butterworth Low-pass Filter |');
disp(' --------------------------------------------');
fs=input('Sampling frequency: ');% around 20e3;
s = tf('s'); % The analog form
num = 1;
den = [1 1.414 1 ];

%Converting to digital form 
[numd,dend] = bilinear(num,den,fs)

zplane(dend,numd)
pause;
freqz(dend,numd,fs) % plotting the response.
pause;

Thankyou very much for any help . REally appreciate it.

Regards,
Ana

(ps. can i use this method to transform ANY other filter, like the  chebyshev, elliptic, thompson etc.... THANKS ALOT!!!)