I have an excrercise in the signals course which requires me to filter noise from an audio file using Fourier Transformation. I would like you to check the code I wrote and tell me what mistakes or propblems I have.
I read the audio which contains the noise file using matlab, plotted the file in time domain (this plot was strange and different from the ones I usually get from the audio files, maybe because of the noise?), converted the matrix of samples to freqeuncy domain using fft, plotted the file in frequency domain, used a for loop to reduce the magnitudes of the frequencies that are above other values (as recommended by our instructor), converted the file back to time domain, plotted it and played it.
The problems I have is that the final file, which is filtered, does not produce any sound. I checked its plot and I found that the magnitudes of the samples are very small. I will leave the code below, the link which I used to apply the fft, and a dropbox link with the figures I got and the sound file we are asked to filter. Please help.
Thanks in advance.
title('plot of the sound file in time domain');
Y = abs( Y(1:N) ) ./ (N/2);
title('plot of the sound file in frequency domain');
for i=1 :N
if Y(i) >0.01
title('plot of the sound file in frequency domain after filtering the frequncies');
title('plot of the new sound file samples in time domain');