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