La somme de deux signaux après un delta t

Fermé
LemBad Messages postés 1 Date d'inscription vendredi 17 novembre 2017 Statut Membre Dernière intervention 17 novembre 2017 - 17 nov. 2017 à 16:29
Bonjour,

voici mon code

pas=(10^-4)/50;
pas2=0.5*pas;
f1=10^4;
f2=2*f1;
t1=0:pas:10^-4;
t2=0:pas:10^-4;
L=100000;
n1=1.2;n2=2;
c=3*10^8;
v1=c/n1;v2=c/n2;
deltt1=L/v1;deltt2=L/v2;
s1=sin(2*pi*f1*t1);
s2=0.5*sin(2*pi*f2*t2);
s=s1+s2;
figure(1)
subplot(2,2,1)
plot(t1,s1,t2,s2)
grid
subplot(2,2,2)
plot(t1,s)
grid
subplot(2,2,[3 4])
plot(g1,s1,g2,s2)
grid

g1=deltt1+t1;
g2=deltt2+t2;

x1=sin(2*pi*f1*g1);
x2=0.5*sin(2*pi*f2*g2);

x3=x1+x2;

figure(6)
subplot(3,3,[1 2 3])
plot(g5,x1)
axis([0 7.8*10^-4 -1.5 1.5 ])
grid
title('x1')
subplot(3,3,[4 5 6])
plot(g6,x2,'red')
axis([0 7.8*10^-4 -1.5 1.5 ])
grid
title('x2')
subplot(3,3,[7 8 9])
plot(g6,x3)
axis([0 7.8*10^-4 -1.5 1.5 ])
grid
title('x1+x2')




lorsque je plot voici le graphe de sortie



mais c'est faut
normalement le signal de sorti sera quelque chose comme ça



merci