Skip to content
Snippets Groups Projects
Commit e0a835a7 authored by YE Victor's avatar YE Victor
Browse files

Upload New File

parent 5ec72d9f
Branches
No related tags found
Loading
clear; clc;
% Paramètres
tau = 100;
g = 0.6;
N = 2048;
nu = linspace(0, 0.1, N/10);
% Réponse théorique
H_th = abs(1 ./ (1 + g * exp(-1j * 2 * pi * nu * tau)));
H_th_db = 20 * log10(H_th);
% Réponse impulsionnelle numérique (on a recopié analyse_delay.m)
a = [1, zeros(1, tau - 1), g];
b = 1;
x = zeros(1, N);
x(1) = 1;
h = filter(b, a, x);
% FFT de h et conversion en dB
H_fft = abs(fft(h, N));
H_fft_db = 20 * log10(H_fft(1:N/10) + eps);
% Tracé
figure;
plot(nu, H_th_db, 'r-', 'LineWidth', 1.5); hold on;
plot(nu, H_fft_db, 'b--');
xlabel('Fréquence réduite \nu');
ylabel('|H(\nu)| en dB');
title('Réponse en fréquence (module) sur plage réduite [0, 0.1]');
legend('Théorique', 'Numérique');
grid on;
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment