1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
| [x,Fs] = wavread('C:\Users\issam elhamdi\Downloads\Music\guitar_si.wav') ;
T=1/Fs;
L=length(x)
t=(0:L-1)*T;
subplot(4,1,1);
plot(t,x);
title('signal enregistré');
xlabel('temps en (S)');
ylabel('Amplitude');
t=0:1/Fs:(L-1)*T;
b=randn(size(t));
L=length(b)
subplot(4,1,2);
plot(t,b);
title('signal bruit');
xlabel('temps en (S)');
ylabel('Amplitude');
y=x+b;
L=length(y)
subplot(4,1,3);
plot(t,y);
y=fft(x/L);
f=(Fs/2)*linspace(0,1,L/2+1);
subplot(4,1,4);
z=2*abs(y(1:L/2+1));
plot(f,z);
xlabel('frequence en Hz');
ylabel('|y(f)|') |
Partager