Skip to Main Content Skip to Search
Accelerating the pace of engineering and science

Is there a function that calculates circular cross-correlation of sequences?


Date Last Modified: Friday, June 26, 2009
Solution ID:   1-16GLY
Product:   Signal Processing Toolbox
Reported in Release:   R2007b
Platform:   All Platforms
Operating System:   All OS
 

Subject:

Is there a function that calculates circular cross-correlation of sequences?

Problem Description:

I know that XCORR calculates linear cross-correlation function estimates, but I wonder if there is a function that calculates circular correlation.

Solution:

The CCONV function in the Signal Processing Toolbox 6.8 (R2007b) can be used to calculate the circular cross-correlation of two sequences.

The following example calculates a modulo-4 circular cross-correlation of two sequences:
a = [2 1 2 1];
b = [1 2 3 4];
c = cconv(a,b,4)

For previous versions you would need to implement a custom function in order to compute the circular cross-correlation.

Please provide feedback to help us improve this Solution
Contact support