From: Rajkumar Ramasamy on
I have been reading the demo of Active noise control by Filtered X LMS algorithm and in that the author is using a data to calculate the impulse response rather than using a impulse as a signal ..

http://www.mathworks.com/products/filterdesign/demos.html?file=/products/demos/shipping/filterdesign/adaptfxlmsdemo.html

Fs = 8000;
N = 800;
delayS = 7;
Fd = fdesign.bandpass('N,Fst1,Fst2,Ast',8,0.04,0.5,20);
Hd = design(Fd,'cheby2','FilterStructure','df2tsos');
H = filter(Hd,[zeros(1,delayS) log(0.99*rand(1,N-delayS)+0.01).* ...
sign(randn(1,N-delayS)).*exp(-0.01*(1:N-delayS))]);
H = H/norm(H);
t = 1/Fs:1/Fs:N/Fs;
plot(t,H,'b');
xlabel('Time [sec]');
ylabel('Coefficient value');
title('True Secondary Path Impulse Response');