Mercurial > hg > aimc
diff trunk/matlab/bmm/carfac/CARFAC_Spatial_Smooth.m @ 665:d0ff15c36828
Turn the AGC coeffs inside out: array of structs instead of a struct of little arrays.
In C++ use a vector<AGC_coeffs> for this; each of 4 stages has an entry; many fewer places
need to do indexing by stage, and this removes the temptation to use little eigen arrays
for the 4 stages.
Also latest version of experimental log-lag SAI hacks.
author | dicklyon@google.com |
---|---|
date | Tue, 21 May 2013 04:24:05 +0000 |
parents | 2964a3b4a00a |
children |
line wrap: on
line diff
--- a/trunk/matlab/bmm/carfac/CARFAC_Spatial_Smooth.m Fri May 17 19:52:45 2013 +0000 +++ b/trunk/matlab/bmm/carfac/CARFAC_Spatial_Smooth.m Tue May 21 04:24:05 2013 +0000 @@ -17,17 +17,17 @@ % See the License for the specific language governing permissions and % limitations under the License. -function stage_state = CARFAC_Spatial_Smooth(coeffs, stage, stage_state) +function stage_state = CARFAC_Spatial_Smooth(coeffs, stage_state) % function AGC_state = CARFAC_Spatial_Smooth( ... % n_taps, n_iterations, FIR_coeffs, AGC_state) -n_iterations = coeffs.AGC_spatial_iterations(stage); +n_iterations = coeffs.AGC_spatial_iterations; use_FIR = n_iterations < 4; % or whatever condition we want to try if use_FIR - FIR_coeffs = coeffs.AGC_spatial_FIR(:,stage); - switch coeffs.AGC_spatial_n_taps(stage) + FIR_coeffs = coeffs.AGC_spatial_FIR; + switch coeffs.AGC_spatial_n_taps case 3 for iter = 1:n_iterations stage_state = ...