0001 function [c0,c1]=nt_bias_filter(x,B,A)
0002
0003
0004
0005
0006
0007
0008
0009
0010 if nargin<3;
0011 error('!');
0012 end
0013
0014 c0=nt_cov(x);
0015 x=filter(B,A,x);
0016 c1=nt_cov(x);
0017 return
0018
0019
0020
0021
0022 w=0.3;
0023 Q=10;
0024 bw=f/Q;
0025 [B,A]=secondorderPeak(w,bw);
0026
0027
0028
0029 function [B,A] = secondorderPeak(Wo,BW)
0030
0031
0032
0033 BW = BW*pi;
0034 Wo = Wo*pi;
0035
0036 Ab=(10*log10(2));
0037
0038 Gb = 10^(-Ab/20);
0039 beta = (Gb/sqrt(1-Gb.^2))*tan(BW/2);
0040 gain = 1/(1+beta);
0041
0042 B = (1-gain)*[1 0 -1];
0043 A = [1 -2*gain*cos(Wo) (2*gain-1)];