Académique Documents
Professionnel Documents
Culture Documents
TP 2
TP 2
M3IR
MOUSSAOUI KATIA
fe=1000;
Te=1/fe;
f0=50;
sigma2=0.3;
tn=0:1/fe:100e-3-1/fe;
xn=a*sin(2*pi*f0*tn+pi/2);
bn=sqrt(sigma2)*randn(1,length(tn));
yn=xn+bn;
t=-40:1:40;
figure(1)
cx=xcorr(xn,xn,40);
subplot(3,1,1);
stem(t,cx)
cb=xcorr(bn,bn,40);
subplot(3,1,2);
stem(t,cb)
subplot(3,1,3);
stem(t,cy)
fe=1000;
Te=1/fe;
f0=50;
sigma=0.5;
tn=0:1/fe:100e-3-1/fe;
xn=a*sin(2*pi*f0*tn+pi/2);
bn=sigma*randn(1,length(tn));
yn=xn+bn;
t=-40:1:40;
figure(1)
cx=xcorr(xn,xn,40);
subplot(3,1,1);
stem(t,cx)
cb=xcorr(bn,bn,40);
subplot(3,1,2);
stem(t,cb)
cy=xcorr(yn,yn,40);
subplot(3,1,3);
stem(t,cy)
fe=1000000;
m1=randn(1,50);
m2=sin(2*pi*(1:50)*0.1);
m3=sin(2*pi*(1:50)*0.1).*exp(-(-24:25).^2/10^2);
cm1=xcorr(m1,m1,20);
cm2=xcorr(m2,m2,20);
cm3=xcorr(m3,m3,20);
t=(-20:20)/fe;
subplot(311);
plot(t,cm1)
subplot(312);
plot(t,cm2)
subplot(313);
plot(t,cm3)