필터 지우기
필터 지우기

Comparing fft of wavefiles

조회 수: 1 (최근 30일)
Anurag Pujari
Anurag Pujari 2013년 2월 16일
I have to compare fft's of two wave files.What are the procedures to do so?Is there any predefined function for finding euclidean distance between two vectors in MATLAB?

답변 (1개)

Wayne King
Wayne King 2013년 2월 16일
yes, there are, but what are you trying to achieve. Do you know about coherence? Coherence is a frequency-domain measure of correlation. The values are between 0 and 1 (as opposed to [-1, 1] for the "usual" correlation). If you have the Signal Processing Toolbox, mscohere() computes the magnitude-squared coherence.
t = 0:0.001:1-0.001;
x = cos(2*pi*100*t)+0.5*cos(2*pi*200*t-pi/4)+randn(size(t));
y = 0.8*sin(2*pi*100*t)+0.75*sin(2*pi*200*t-pi/8)+randn(size(t));
[Cxy,F] = mscohere(x,y,200,100,200,1000);
plot(F,Cxy)
The above plot clearly shows that both x and y have coherent frequency content at 100 and 200 Hz.

카테고리

Help CenterFile Exchange에서 Correlation and Convolution에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by