MATLAB: Performing Fourier transform on .wav file

audioinfoaudioreadfftfourierwav

What I want to do is perform a fourier transform on a song in *.wav form. I am able to bring the file into my workspace using
[file, pathname] = uigetfile('*.wav')
and selecting the file I want. However, I cannot get farther than this: when I try to get information about the file through
audioinfo(file) or audio read(file)
I get the error message, "The filename specified was not found in the MATLAB path."
What does this mean, and how can I perform the fft on this particular file?
Thank you!!

Best Answer

filename = fullfile(pathname, file);
[data, Fs] = wavread(filename);
freqdata = fft(data);
Related Question