cross correlation plot- symmetry about y axis

2 ビュー (過去 30 日間)
Varun
Varun 2014 年 8 月 13 日
回答済み: Honglei Chen 2014 年 8 月 13 日
I have two cosine signals both having a frequency of 100 Hz and the second signal has been delayed in time by 0.003 seconds. Both signals have been sampled at 1 Khz. When I use the cross correlation function and plot it to verify the delay between the signals, I expect to see a single point in time at which the signals are aligned but the plot looks sort of symmetrical about the y axis. Why is that? Any help would be much appreciated.
st=1/1000;
t=[0:999]*st;
s1=cos(2*pi*100*t);
t1=t-(3*st);
s2=cos(2*pi*100*t1);
[c,lags]=xcorr(s1,s2); plot(lags,c/max(abs(c)))

採用された回答

Honglei Chen
Honglei Chen 2014 年 8 月 13 日
You have a cosine signal with multiple periods. So when you move back and forth for a period, you get another match. Guaranteed the delay that matches the two exactly should produce the highest peak but nevertheless there will be other peaks when you delay/advance multiple periods.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeDescriptive Statistics についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by