I wrote the following code below. I need to now use the FFT fucntion in matlab t
ID: 1730385 • Letter: I
Question
I wrote the following code below. I need to now use the FFT fucntion in matlab to plot my oringal sound signal, my noisysignal, my original signal with noise, and then my signal with nosie removed(After the filter). Please help!
%Sampling frequency almost twice of the frequency fs- 784; %Declaring the frequency value frequencv- 392; %Duration of 5 seconds duration- 5 %Declaring the amplitude amp-15; %Calculating the values values- (0:1/fs:duration); %Creating the sound matrix mySound- amp* sin(2"pi*frequency*values); %Normalizing the sound matrix to make in range of 16 bit precision max value- max(abs(mySound)); %Declaring the file name to save the audio filename - 'myAudioFile.wav'; audiowrite(filename, mySound, fs); [tune.fs] - audioread(filename); %Adding noise to the original signal %Function that can add noise to any random sound signal randn(length(tune),1); %Playing the signal with noise disp('Make sure your speakers are on.'); disp(Playing the audio..."); %Declaring the file name to save the audio filename -'myAudioFile.wav; audiowrite(filename, mySound, fs); filename); %Removing noise from the sound signal %Read in the audio file [tune.fs- audioread(filename); %Play the original sound to remember what it sounds like pl- audioplaver(tune.fs); plplay; %Take the time domain representation of the wave by plotting them as two channels NzSize(tune, 1);Explanation / Answer
Generally FFT is require for the fourier transform sequence.
So we can write for the noise signal as,