comparison m-toolbox/classes/@pz/rz2iir.m @ 0:f0afece42f48

Import.
author Daniele Nicolodi <nicolodi@science.unitn.it>
date Wed, 23 Nov 2011 19:22:13 +0100
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:f0afece42f48
1 % RZ2IIR Return a,b IIR filter coefficients for a real zero designed using the bilinear transform.
2 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3 %
4 % DESCRIPTION: RZ2IIR Return a,b IIR filter coefficients for a real zero
5 % designed using the bilinear transform.
6 %
7 % CALL: [a,b] = rz2iir(z, fs)
8 %
9 % REMARK: This is just a helper function. This function should only be
10 % called from class functions.
11 %
12 % INPUT: z - zero object
13 % fs - the sample rate for the filter
14 %
15 % VERSION: $Id: rz2iir.m,v 1.7 2011/02/18 16:48:54 ingo Exp $
16 %
17 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
18
19 function varargout = rz2iir(varargin)
20
21 z = varargin{1};
22 fs = varargin{2};
23
24 f0 = z.f;
25 w0 = f0*2*pi;
26
27 a(1) = (2*fs + w0) / w0;
28 a(2) = (-2*fs + w0) / w0;
29
30 b(1) = 1;
31 b(2) = 1;
32
33 varargout{1} = a;
34 varargout{2} = b;
35 end
36