return a high pass filter miir(). A Butterworth filter is used. M Hewitson 27-08-02 $Id: mkhighpass.html,v 1.1 2007/06/08 14:15:06 hewitson Exp $
0001 function f = mkhighpass(pl) 0002 0003 % return a high pass filter miir(). A Butterworth filter is used. 0004 % 0005 % 0006 % M Hewitson 27-08-02 0007 % 0008 % 0009 % $Id: mkhighpass.html,v 1.1 2007/06/08 14:15:06 hewitson Exp $ 0010 % 0011 0012 g = find(pl, 'gain'); 0013 fc = find(pl, 'fc'); 0014 fs = find(pl, 'fs'); 0015 order = find(pl, 'order'); 0016 0017 0018 if(fc > fs/2) 0019 error('fc must be < fs/2'); 0020 end 0021 0022 f.name = 'std highpass'; 0023 f.fs = fs; 0024 f.ntaps = order+1; 0025 [f.a, f.b] = butter(order, 2*fc/fs, 'high'); 0026 f.g = g; 0027 f.histin = zeros(1,f.ntaps-1); % initialise input history 0028 f.histout = zeros(1,f.ntaps-1); % initialise output history 0029 0030 % END 0031