comparison trunk/matlab/bmm/carfac/CARFAC_Spatial_Smooth.m @ 536:2964a3b4a00a

New design params, including narrower AGC, Greenwood map for more channels, default 71, some renaming, open loop feature, ...
author dicklyon@google.com
date Thu, 22 Mar 2012 22:37:56 +0000
parents 95a11cca4619
children d0ff15c36828
comparison
equal deleted inserted replaced
535:dcf18d03d608 536:2964a3b4a00a
25 25
26 use_FIR = n_iterations < 4; % or whatever condition we want to try 26 use_FIR = n_iterations < 4; % or whatever condition we want to try
27 27
28 if use_FIR 28 if use_FIR
29 FIR_coeffs = coeffs.AGC_spatial_FIR(:,stage); 29 FIR_coeffs = coeffs.AGC_spatial_FIR(:,stage);
30 switch coeffs.AGC_n_taps(stage) 30 switch coeffs.AGC_spatial_n_taps(stage)
31 case 3 31 case 3
32 for iter = 1:n_iterations 32 for iter = 1:n_iterations
33 stage_state = ... 33 stage_state = ...
34 FIR_coeffs(1) * stage_state([1, 1:(end-1)], :) + ... 34 FIR_coeffs(1) * stage_state([1, 1:(end-1)], :) + ...
35 FIR_coeffs(2) * stage_state + ... 35 FIR_coeffs(2) * stage_state + ...
43 FIR_coeffs(2) * stage_state + ... 43 FIR_coeffs(2) * stage_state + ...
44 FIR_coeffs(3) * (stage_state([2:end, end], :) + ... 44 FIR_coeffs(3) * (stage_state([2:end, end], :) + ...
45 stage_state([3:end, end, end-1], :)); 45 stage_state([3:end, end, end-1], :));
46 end 46 end
47 otherwise 47 otherwise
48 error('Bad n_taps in CARFAC_Spatial_Smooth'); 48 error('Bad AGC_spatial_n_taps in CARFAC_Spatial_Smooth');
49 end 49 end
50 else 50 else
51 % use IIR method, back-and-forth firt-order smoothers: 51 % use IIR method, back-and-forth first-order smoothers:
52 stage_state = SmoothDoubleExponential(stage_state, ... 52 stage_state = SmoothDoubleExponential(stage_state, ...
53 coeffs.AGC_polez1(stage), coeffs.AGC_polez2(stage)); 53 coeffs.AGC_polez1(stage), coeffs.AGC_polez2(stage));
54 end 54 end