RP2IIR Return a,b coefficients for a real pole designed using the bilinear transform. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% DESCRIPTION: RP2IIR Return a,b coefficients for a real pole designed using the bilinear transform. CALL: filt = rpole(p, fs) INPUT: p - pole object fs - the sample rate for the filter VERSION: $Id: rp2iir.m,v 1.2 2007/07/18 13:58:45 ingo Exp $ HISTORY: 03-03-07 M Hewitson Creation %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0001 function [a,b] = rp2iir(p, fs) 0002 % RP2IIR Return a,b coefficients for a real pole designed using the bilinear transform. 0003 % 0004 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0005 % 0006 % DESCRIPTION: RP2IIR Return a,b coefficients for a real pole designed using 0007 % the bilinear transform. 0008 % 0009 % CALL: filt = rpole(p, fs) 0010 % 0011 % INPUT: p - pole object 0012 % fs - the sample rate for the filter 0013 % 0014 % VERSION: $Id: rp2iir.m,v 1.2 2007/07/18 13:58:45 ingo Exp $ 0015 % 0016 % HISTORY: 03-03-07 M Hewitson 0017 % Creation 0018 % 0019 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0020 0021 f0 = get(p, 'f'); 0022 w0 = f0*2*pi; 0023 a(1) = w0 / (2*fs + w0); 0024 a(2) = a(1); 0025 b(1) = 1; 0026 b(2) = (w0-2*fs) / (w0+2*fs); 0027 0028 % END