Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

How to get the values of signal frequencies that was loaded from wav file to variable

Status
Not open for further replies.

toybani

Newbie level 3
Joined
Jun 15, 2010
Messages
3
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,299
hi... I load a wav file to a variable....
how can i get the values of the frequencies of this signal???
thanks
 

Re: signal frequencies

well thanks but I still can't figure it out...

we have:
i=wavread('sound.wav');
x=abs(fft(i));

how then can i see which frequencies exist in this signal???
 

signal frequencies

You need to know the sampling frequency, Fs. Then you can plot the spectrum as follows:
Code:
[x,Fs,NBIT]=wavread('sound.wav'); 
N=length(x);
X=fft(x);
f=(0:N/2-1)*Fs/N;
plot(f,abs(X(1:N/2)))
You might have to adjust the vector sizes, using floor if your number of points is not even, but I hope you get the point...
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top