Generalized cross correlation problem
古いコメントを表示
Hello everybody, I wrote a code for generilizrd cross correlation (GCC) to find the time delay between two signals but unfortunatly the index of the maximum value is always zero ,how can I solve this problem. This is my code :
fChannel1 = fft(x1);
fChannel2 = fft(x2);
conjFChannel2 = conj(fChannel2);
num = (fChannel1).*conjFChannel2;
den = abs((fChannel1).*(conjFChannel2));
fGeneralized = num./(den);
generalizedCrossCorrelation = ifft(fGeneralized);
[maxcorr max_index] = max(fftshift(generalizedCrossCorrelation));
Any help in this regard will be appreciated.
4 件のコメント
Image Analyst
2013 年 4 月 1 日
You forgot to supply the data (x1 and x2).
Shayan
2013 年 4 月 1 日
Image Analyst
2013 年 4 月 1 日
You do know that the cross correlation of two signals has a length that is equal to both the lengths of the component signals added together, don't you? Did you take that into account?
Shayan
2013 年 4 月 1 日
回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Correlation and Convolution についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!