how does one do a fourier analysis on a .wav file. Just figured out how to import a .wav file into matlab. when i download it , it just brings up a bunch of numbers. How do i go about doing a fourier analysis with this data. I have done the entire st

6 views (last 30 days)
Just figured out how to import a .wav file into matlab. when i download it , it just brings up a bunch of numbers. How do i go about doing a fourier analysis with this data. I have done the entire student tutorial for Matlab but could not figure it out.
Am an 11th grader and would need some help

Accepted Answer

Image Analyst
Image Analyst on 27 Dec 2013
Well the sound file is just a bunch of numbers. Each number represents a voltage that gets sent to the speaker (simplified explanation). To take the audio frequency spectrum you can call the FFT:
theSpectrum = fft(theWavSignal);
plot(real(theSpectrum));
  1 Comment
Walter Roberson
Walter Roberson on 27 Dec 2013
One trick here is that the information in a .wav file is usually stereo, two channels, and that each channel is stored as one column of the data.
wavdata = wavread(...);
wavdata(:,1) is left channel
wavdata(:,2) is right channel

Sign in to comment.

More Answers (0)

Categories

Find more on Audio I/O and Waveform Generation in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!