comparisons

This commit is contained in:
Arnaud REY DU BOISSIEU 2023-03-21 17:10:21 +01:00
parent dcaafdc9cf
commit 6ecd441fd5
4 changed files with 17 additions and 5 deletions

BIN
comparison.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 204 KiB

BIN
comparison_zoomed.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 203 KiB

BIN
modulator_new.wav Normal file

Binary file not shown.

View File

@ -5,10 +5,22 @@
% i between 1.95 and 2.05
t = (0:length(y)-1)/Fs;
#[pwr, dur] = frequencySpectrum(y, Fs, 0);
#xlabel("Timee (s)");
#ylabel("Amplitude");
%[pwr, dur] = frequencySpectrum(y, Fs, 0);
%xlabel("Timee (s)");
%ylabel("Amplitude");
#spectrogram(y,Fs,5,5);
Fs = downsample(Fs ,4000);
audiowrite("modulator22.wav", y, Fs);
Factor_of_reduction = 2;
y_down = downsample(y,Factor_of_reduction);
y_decimate = decimate(y,Factor_of_reduction);
audiowrite("modulator_new.wav", y_down, Fs/Factor_of_reduction);
plot (t,y,'b')
hold on
t2 = (0:length(y_down)-1)/(Fs/Factor_of_reduction);
plot (t2,y_down,'r')
t3 = (0:length(y_decimate)-1)/(Fs/Factor_of_reduction);
plot (t3,y_decimate,'g');