MATLAB to find individual frequency from a source

2 ビュー (過去 30 日間)
Audrey
Audrey 2014 年 4 月 28 日
回答済み: Roberto 2014 年 4 月 28 日
I am a beginner in MATLAB and have a .wav file recorded a mixture of sound. Currently I am able to do simple stuffs like plotting a graph in time and freq domain. Through the code, i was able to find the fs is 44100, 16 bits and time is from the input data. However, I do not know how I can find or isolate the frequencies in .wav file to find the source in the mixture. I saw examples whereby they have the original tone/sound and using that frequency to find the different frequencies in the mixture of sound. I do not have any reference to compare with except for having to derive from the .wav file. Any kind souls who can guide me on how to find out each individual frequencies from a mixture. Thank you.

採用された回答

Roberto
Roberto 2014 年 4 月 28 日
Here's something i wrote time ago...
y = wavread('yourfile.wav');
sampleRate = 44100 ; % findout your samplerate
[n, ~] = size(y) ;
Yy = fft(y) ;
Pot = Yy .* conj(Yy) / n;
Freq = (sampleRate / n *(1:n))';
plot(Freq(1:round(n/2)) , Pot(1:round(n/2)) );

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeAudio I/O and Waveform Generation についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by