I took a file which was a clean, repeating waveform of the note F2 (I deduced this by playing F2 on the virtual piano and playing the wave fle, and comparing) on a piano. When I did the fft of the signal, by using wavread of the saved wav file, I got a peak frequency of 176.4 Hz, which is one octave off the correct frequency of the note F2.
When I analysed another note, this time recorded from a physical piano, I got the exact same peak frequency. How is this possible? It is possible that MATLAB stores the peak frequency in its memory for more than one file? If so, how do I solve this problem?
P.S. when we analysed a full song, i.e. a wav file containing many notes, we got many peaks, which confirmed that we weren't using the same graph for everything.