 
% Trace les reponses impulsionnelles et reponses en frequences des trois
% canaux test tires de: Digital Comuunications / Proakis (4e edition p.631)
%
% Marc Castella, 28/03/2006
% INT (Institut National des Telecommunications), Departement CITI
% Evry, France
  
clear; close all;

h1 = [0.04 -0.05 0.07 -0.21 -0.5 0.72 0.36 0 0.21 0.03 0.07].';
h2 = [0.407 0.815 0.407].';
h3 = [0.227 0.460 0.688 0.460 0.227].';

[H1,W] = freqz(h1,1,128,1);
[H2,W] = freqz(h2,1,128,1);
[H3,W] = freqz(h3,1,128,1);

figure(1);
subplot(3,1,1); stem(h1); title('Reponse impulsionnelle canal (a)');
subplot(3,1,2); stem(h2,'Color',[0 0.5 0]); title('Reponse impulsionnelle canal (b)');
subplot(3,1,3); stem(h3,'r'); title('Reponse impulsionnelle canal (c)');

figure(2);
plot(W,10*log(abs([H1 H2 H3]))); axis([0 0.5 -50 10]);
title('Reponse frequentielle des trois canaux test de Proakis (p. 631)');
legend('Canal (a)','Canal (b)','Canal (c)','Location','SouthWest');
ylabel('Module (dB)');
xlabel('Frequence normalisee');

