Hello,
I hope this is going in the right place on the board, but if not please tell me and I'll post elsewhere.
Anywayy.
As part of a project I have to import,play, analyse and then design a filter on Matlab to clean a piece of audio(WAVE). I've been going through the initial parts of importing the audio using Wavread, and playing using Wavplay, and that's all worked fine.
However I'm at the analysing stage now, and my tutor has given me a code to use which I don't really understand, and so I can't really make anything out from the plot's I've got.
So to get to the point I was wondering if anyone here had any idea of what the code I've used is doing? And if so how to interpret the plot's I've made with them.
This is what I've got so far
>> y=wavread('music14.wav');
>> [y,fs]=wavread('music14.wav');
>> wavplay(y,fs)
>> mag=abs(fft(y));
>> f=fs*(0:length(y)-1)/length(y);
>> plot(f(1:500),mag(1:500))
>> stem(f(1:500),mag(1:500))
What's really confusing me is the section below. I'm just not sure what the code is trying to do.
>> mag=abs(fft(y));
>> f=fs*(0:length(y)-1)/length(y);
And these are the graphs that came out.
http://i52.tinypic.com/35an8md.jpg
http://i53.tinypic.com/qsmi3p.jpg
Do these mean that the filter I need to design needs to be a low pass, below 4500hz? or am I totally off the mark.
Also, I vaguely know where to start designing the filter, but is it easy to implement the filter from the FDA tool in Matlab to the code? Or will it be better to code one?
Any help is much appreciated.
I hope this is going in the right place on the board, but if not please tell me and I'll post elsewhere.
Anywayy.
As part of a project I have to import,play, analyse and then design a filter on Matlab to clean a piece of audio(WAVE). I've been going through the initial parts of importing the audio using Wavread, and playing using Wavplay, and that's all worked fine.
However I'm at the analysing stage now, and my tutor has given me a code to use which I don't really understand, and so I can't really make anything out from the plot's I've got.
So to get to the point I was wondering if anyone here had any idea of what the code I've used is doing? And if so how to interpret the plot's I've made with them.
This is what I've got so far
>> y=wavread('music14.wav');
>> [y,fs]=wavread('music14.wav');
>> wavplay(y,fs)
>> mag=abs(fft(y));
>> f=fs*(0:length(y)-1)/length(y);
>> plot(f(1:500),mag(1:500))
>> stem(f(1:500),mag(1:500))
What's really confusing me is the section below. I'm just not sure what the code is trying to do.
>> mag=abs(fft(y));
>> f=fs*(0:length(y)-1)/length(y);
And these are the graphs that came out.
http://i52.tinypic.com/35an8md.jpg
http://i53.tinypic.com/qsmi3p.jpg
Do these mean that the filter I need to design needs to be a low pass, below 4500hz? or am I totally off the mark.
Also, I vaguely know where to start designing the filter, but is it easy to implement the filter from the FDA tool in Matlab to the code? Or will it be better to code one?
Any help is much appreciated.