%implements the delay modelling filter %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% function W = calibration(N,mu,adapt) %construct first filtercoefficient vector W = [zeros(2*N,1)]; %first values of output and error output = [];error =[]; %read-out the input samples K = floor((length(white_hrtf(1:96000,1))-2*N)/N);%number of read operations for k = 0:1:K if (k == 0) x = [zeros(N,1);white_hrtf(1:N,2)]; d = white_hrtf(1:N,1); else x = white_hrtf((k*N-N)+1:(k*N+N),2); d = white_hrtf((k*N+1):(k*N+N),1); end if (test == 1) y = IO_test(x); output = [output,y']; else [y,e,W] = fdaf_lms(x,d,W,N,mu,adapt); output = [output,y']; error = [error,e']; end end %plot error and output if required figure; subplot(2,1,1);plot(,error