Return a,b IIR filter coefficients for a complex zero designed using the bilinear transform. usage: [a,b] = cz2iir(z, fs) z - zero object fs - the sample rate for the filter M Hewitson 03-04-07 $Id: cz2iir.html,v 1.1 2007/06/08 14:15:09 hewitson Exp $
0001 function [a,b] = cz2iir(z, fs) 0002 0003 % Return a,b IIR filter coefficients for a complex zero 0004 % designed using the bilinear transform. 0005 % 0006 % usage: [a,b] = cz2iir(z, fs) 0007 % 0008 % z - zero object 0009 % fs - the sample rate for the filter 0010 % 0011 % M Hewitson 03-04-07 0012 % 0013 % $Id: cz2iir.html,v 1.1 2007/06/08 14:15:09 hewitson Exp $ 0014 % 0015 0016 f0 = get(z, 'f'); 0017 q = get(z, 'q'); 0018 0019 w0 = f0*2*pi; 0020 w02 = w0^2; 0021 0022 a(1) = (-q*w02/2 - 2*q*fs*fs - w0*fs) / (q*w02); 0023 a(2) = (-w02+4*fs*fs) / w02; 0024 a(3) = (-q*w02/2 - 2*q*fs*fs + w0*fs) / (q*w02); 0025 0026 b(1) = 1; 0027 b(2) = -2; 0028 b(3) = -1; 0029 0030 % END