################# #Created By: Gabriel LUCAS #Created :24/03/2023 08:27:54 # #Last modified: 02/03/2023 08:28:32 # # # # ################# pkg load signal; [y fs] = audioread("modulator22.wav"); t=[1:1:size(y,1)]; figure; subplot(1,1,1); plot(t,y) %xlabel('Time (s)'); %ylabel('Sound (dB)'); %Frequency spectrum using DFT %%%%%[powerDFT durationDFT] = frequencySpectrum(y, fs, false); %Frequency spectrum using FFT %%%%%[powerFFT durationFFT] = frequencySpectrum(y, fs, true); sprintf(["time used for DFT: " num2str(durationDFT)]) sprintf(["time used for FFT: " num2str(durationFFT)]) spectrogram(y, fs, 5, 30); spectrogram(y, fs, 5, 5); %spectrogram of "one" spectrogram(y(0.76*fs:0.96*fs), fs, 5, 30); %spectrogram of "two" spectrogram(y(1.38*fs:1.64*fs), fs, 5, 30); %spectrogram of "three" spectrogram(y(1.88*fs:2.18*fs), fs, 5, 30);