0001 function f = mkbandpass(pl)
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012 g = find(pl, 'gain');
0013 fc = find(pl, 'fc');
0014 fs = find(pl, 'fs');
0015 order = find(pl, 'order');
0016 win = find(pl, 'Win');
0017
0018 if(fc > fs/2)
0019 error('fc must be < fs/2');
0020 end
0021 if(fc(1) > fc(2))
0022 error('fc(1) must be < fc(2)');
0023 end
0024
0025 f.name = 'std bandpass';
0026 f.fs = fs;
0027 f.ntaps = order+1;
0028 f.a = fir1(order, 2.*fc/fs, 'bandpass', win.win);
0029 f.gd = (f.ntaps)/2;
0030 f.g = g;
0031 f.histout = zeros(1,f.ntaps-1);
0032
0033
0034