Skip to content
Snippets Groups Projects
Commit 17dcfd10 authored by LHOMME Titouan's avatar LHOMME Titouan
Browse files

Upload New File

parent 737a6e6f
Branches
No related tags found
No related merge requests found
load('signal_excitation.mat');
rxe1 = xcorr(xe1, 'coeff');
rxe2 = xcorr(xe2, 'coeff');
subplot(2,1,1);
plot(rxe1);
title('Autocorrélation de xe1');
xlabel('Décalage');
ylabel('Coefficient');
subplot(2,1,2);
plot(rxe2);
title('Autocorrélation de xe2');
xlabel('Décalage');
ylabel('Coefficient');
x = xe1;
fs = 44100;
y = simule_piece(x, fs);
r_yx = xcorr(y, x); % corrélation croisée sans normalisation
r_yx = r_yx / (norm(y)*norm(x)); % normalisation manuelle
lags = -(length(y)-1):(length(x)-1);
t = lags / fs;
disp(['Taille de r_yx : ', num2str(length(r_yx))]);
disp(['Taille de t : ', num2str(length(t))]);
figure;
plot(t, r_yx);
xlabel('Temps (s)');
ylabel('Amplitude');
title('Réponse impulsionnelle estimée de la pièce');
grid on;
xlim([-2 2]);
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment