Why is not cross-correlation symmetric with respect to zero?
18 次查看(过去 30 天)
显示 更早的评论
Hello! /p I need to create a harmonic signal, then to add some noise and to calculate auto cross-correlation. I know that auto cross-correlation must be symmetric with respect to zero. In two following pictures there are my code and the result that I get. How can I make it symmetric?
0 个评论
回答(1 个)
Image Analyst
2017-10-22
When you cross correlate, the final signal length is the sum of the two signal length. You'll need to keep track of where the "zero" x location is. Like for the main signal, if it's centered about x=0 and has N elements, then the x=0 location is around N/2. So for your x array, x(1) is really -N/2 and x(N) is really N/2. Same concept for cross correlation. If both your signals are symmetric with respect to x, then your final signal will go from -(N+M)/2 at x(1) to +(N+M)/2 at the final element x(end).
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!