Séance de TP 2
Séance de TP 2
Séance de TP 2
Exercice 1
%Le code MATLAB suivant permet de générer et de tracer les signaux discrets basiques.
subplot(3,3,1);
stem([1;zeros(49,1)]);
title('impulsion de Dirac')
subplot(3,3,2); stem(ones(50,1));
title('signal échelon unitaire')
subplot(3,3,3);
stem([ones(1,5),zeros(1,3)])
title('signal Rectangulaire')
subplot(3,3,4);
stem(sin(2*pi/8*(0:15)))
title('signal Sinusoidal')
subplot(3,3,5); stem(sinc(0:0.25:8));
title('"Sinc" signal')
subplot(3,3,6); stem(exp(-(0:15)));
title('e^-n signal')
subplot(3,3,7);
stem(pow2(-0.5*(0:15)))
title('2^-(0.5n) signal')
subplot(3,3,8); stem(3.^(0:15));
title('3^n signal')
subplot(3,3,9); stem(randn(1,16));
title('Gaussian random signal')
Exercice 2 Génération de signaux
Fs=16e3; t=0:1/Fs:5e-3;
n=0:length(t)-1;
length(t)%81
Lastt=5e-3*Fs%80
subplot(211);
plot(t,10*sin(2*pi*1200*t+pi/4));
xlabel('continuous time');
ylabel('amplitude')
title('Continuous-time sinusoidal signal')
subplot(212);
stem(10*sin(2*pi*1200/16000*n+pi/4))
xlabel('discrete time');
ylabel('amplitude')
title('Discrete-time sinusoidal signal')
Exercice 3
Tracé d’un signal sinusoïdal à fréquence variable
cos(2*pi* f*t)
f = 0.01 t.
theta = 2*pi*freq.*[0:100];
s = cos (theta);
plot ([0:100],s)
Exercice 4 % signal modulé AM:
n = linspace(0,1200,300); m = 0.7;
fH = 0.8 ; fL = 0.003;
xH = sin(2*pi*fH*n);
xL = sin(2*pi*fL*n);
y = (1+m*xL).*xH;
subplot(211)
stem(n,y); grid ;
xlabel('Time index n');
ylabel('Amplitude');
subplot(212)
plot(n,y); grid ;
Exercice 5
Modulation d’amplitude: