forked from acco/chti23
31 lines
677 B
Matlab
31 lines
677 B
Matlab
close all;
|
|
T = 1/7; %durée d'obs = M*Te. On doit avoir T = k*To = k*Tsin
|
|
M = 32;
|
|
Te = T/M;
|
|
Fe = 1/Te;
|
|
deltaF = Fe/M; % pas fréquentiel
|
|
Tsim = T-Te; %durée de la simulation
|
|
Fsin = 14; %Fsin = Fo --> fréq du sinus
|
|
Res=sim('simulDFT');
|
|
figure(1);
|
|
plot(Res.Sinus_Continu);
|
|
hold on; % permet de superposer la courbe à suivre
|
|
plot(Res.Sinus_Echanti,'o');
|
|
grid;
|
|
title('signaux temporels');
|
|
%help fft;
|
|
figure(2);
|
|
yt = fft(Res.Sinus_Echanti.Data);
|
|
stem(abs(yt)/M);
|
|
grid;
|
|
figure(3);
|
|
xt = linspace(0,31,32);
|
|
stem(xt,abs(yt)/M);
|
|
grid;
|
|
figure(4);
|
|
x = deltaF*[0:1:M-1];
|
|
y = fft(Res.Sinus_Echanti.Data);
|
|
stem(x,abs(y)/M);
|
|
grid;
|
|
title('module de la tfd');
|
|
|