0001 function bexp2=vb_temporal_smooth(bexp)
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011 Nfwd = 2;
0012 Nbck = 2;
0013 Nwidth = Nfwd + Nbck +1;
0014 Nwidth0 = Nfwd + 1;
0015
0016 bexp2 = bexp;
0017 [Nch,Tsamp] = size(bexp2);
0018 bexp3 = zeros(Nch,Tsamp);
0019 t = 3:Tsamp-2;
0020
0021 for k=1:3,
0022
0023
0024 bexp3(:,1) = sum(bexp2(:,1:3),2)/3;
0025 bexp3(:,2) = sum(bexp2(:,1:4),2)/4;
0026
0027 bexp3(:,t) = (bexp2(:,t-2) + bexp2(:,t-1) + bexp2(:,t) ...
0028 + bexp2(:,t+2) + bexp2(:,t+1))/Nwidth;
0029
0030
0031
0032 bexp3(:,Tsamp-1) = sum(bexp2(:,Tsamp-3:Tsamp),2)/4;
0033 bexp3(:,Tsamp) = sum(bexp2(:,Tsamp-2:Tsamp),2)/3;
0034
0035 bexp2 = bexp3;
0036 end