diff --git a/signal/matlab/ScriptDFT.asv b/signal/matlab/ScriptDFT.asv deleted file mode 100644 index 2cca002..0000000 --- a/signal/matlab/ScriptDFT.asv +++ /dev/null @@ -1,76 +0,0 @@ -clc; -clear all; -close all; - -%F1 = 85000; -F1 = 85005.9; -F2 = 90000; -%F3 = 95000; -F3 = 94986.8; -F4 = 100000; -%F5 = 115000; -F5 = 115015.9; -F6 = 120000; - -ChebFac0 = 1; -ChebFac1 = 3.0332e-6; -ChebFac2 = 1.162e-11; -ChebFac3 = 7.6663e-18; -ChebFac4 = 1.7483e-23; - -Fe=320000; -Te = 1/Fe; - -Fsin=120000; -N=6; -M=pow2(N); -T=M*Te; - -% Condition : T < M/(2*Fsin) -%T = pow2(N-2)/Fsin; -%Te = T/M; - - -Tsim = T-Te; -res=sim('Simul6PistoletsDFT.slx'); - - - -%plot(res.Echant.Data); - -F=linspace(0, Fe-Fe/M, M); -% mauvais_echantillon = res.Echant.Data; -% for i = 1:floor((length(mauvais_echantillon) / 2)) -% mauvais_echantillon(i) = 0; -% end -% fourier = abs(fft(mauvais_echantillon)/M); - - -filteredSignal = arrayfun(@(x) chebychev(x), res.Echant.Data); -fourier = abs(fft(filteredSignal)/M); - - -% fourier=abs(fft(res.Echant.Data)/M); - -%res=sim('SimulDFT.slx'); -%fourier=fft(res.Sinus_Echantillon.Data)/M; -%fourier = real(fourier * (1i)); -% bode(tf(F,arrayfun(@(x) chebychev(x), F))); -% -grid; -stem(F, fourier, 'o'); -set(gca, 'YScale', 'log'); - -%plot(res.Sinus_Continu); -%hold on; % permet de superposer la courbe à suivre -%plot(res.Sinus_Echantillon,'o'); - -function filtre = chebychev(p) - ChebFac0 = 1; - ChebFac1 = 3.0332e-6; - ChebFac2 = 1.162e-11; - ChebFac3 = 7.6663e-18; - ChebFac4 = 1.7483e-23; - - filtre = 1 / (ChebFac4 * p^4 + ChebFac3 * p^3 + ChebFac2 * p^2 + ChebFac1 * p + ChebFac0); -end diff --git a/signal/matlab/Simul6PistoletsDFT.slx b/signal/matlab/Simul6PistoletsDFT.slx index cb5f2ca..fee784f 100644 Binary files a/signal/matlab/Simul6PistoletsDFT.slx and b/signal/matlab/Simul6PistoletsDFT.slx differ diff --git a/signal/matlab/Simul6PistoletsDFT.slx.autosave b/signal/matlab/Simul6PistoletsDFT.slx.autosave deleted file mode 100644 index 37e2401..0000000 Binary files a/signal/matlab/Simul6PistoletsDFT.slx.autosave and /dev/null differ