Matlab signal cosinus*porte

Fermé
devti - 26 févr. 2016 à 23:07
Bonjour,
et merci d'avance j'ai réussi a ecrire un script matlab chi affiche une fonction :cosinus*(deux porte different) , mais je sais pas comment decriver les résultats .
t=(-128:127);
fx=(-128:127)/256;
porte=abs(t)<10;
porte2=abs(t)<30;
s=cos(t).*porte;
s1=cos(t).*porte2;
C=fftshift(fft(s)/256);
C1=fftshift(fft(s1)/256);


subplot(2,1,1);
plot(t,C);
xlabel('t (temps)');
ylabel('C (cos(t)*porte) ');
subplot(2,1,2);
plot(t,C1);
xlabel('t (temps)');
ylabel('C1 (cos(t)*porte) ');


figure;
subplot(2,2,1);
plot(fx,abs(C),'r');
hold on;
plot(fx,abs(C1),'b');
xlabel('module C et C1');
ylabel(' C et C1 ');

subplot(2,2,2);
plot(fx,real(C),'r');
hold on;
plot(fx,real(C1),'b');
xlabel('la partie reelle C et C1');
ylabel(' C et C1 ');

subplot(2,2,3);
plot(fx,imag(C),'r');
hold on;
plot(fx,imag(C1),'b');
xlabel('la partie imaginaire C et C1');
ylabel(' C et C1 ');

subplot(2,2,4);
plot(fx,angle(C),'r');
hold on;
plot(fx,angle(C1),'b');
xlabel('la phase C et C1');
ylabel(' C et C1 ');