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 CenterFile Exchange에서 Audio 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