Code covered by the BSD License  

Highlights from
Circular Cross Correlation

4.66667

4.7 | 6 ratings Rate this file 51 Downloads (last 30 days) File Size: 1.62 KB File ID: #4810
image thumbnail

Circular Cross Correlation

by

 

26 Apr 2004 (Updated )

Circular Cross Correlation function estimate.

| Watch this File

File Information
Description

CXCORR Circular Cross Correlation function estimates.
CXCORR(a,b), where a and b represent samples taken over time interval T which is assumed to be a common period of two corresponding periodic signals.

a and b are supposed to be length M row vectors, either real or complex.
 
[x,c]=CXCORR(a,b) returns the length M-1 circular cross correlation sequence c with corresponding lags x.
   
The circular cross correlation is:
          c(k) = sum[a(n)*conj(b(n+k))]/[norm(a)*norm(b)];
where vector b is shifted CIRCULARLY by k samples.

The function doesn't check the format of input vectors a and b!

For circular covariance between a and b look for CXCOV(a,b) in
http://www.mathworks.com/matlabcentral/fileexchange/loadAuthor.do?objectType=author&objectId=1093734

Reference:
A. V. Oppenheim, R. W. Schafer and J. R. Buck, Discrete-Time Signal Processing, Upper Saddler River, NJ : Prentice Hall, 1999.

Author: G. Levin, April 2004.

Acknowledgements

This file inspired Fast Circular (Periodic) Cross Correlation and Circular Statistics Toolbox (Directional Statistics).

MATLAB release MATLAB 6.5 (R13)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (8)
11 Feb 2012 Irine

I'm sorry, but I don't understand how it works too (about the means of a and b) can you give an example, please..

04 Oct 2011 julien

my mistake ! ignore the preceding comment !
(row vectors..)

04 Oct 2011 julien

I'm surprised it is not working only for me.. I get that :

??? In an assignment A(I) = B, the number of elements in B and
I must be the same.

Error in ==> cxcorr at 30
c(k)=a*b';

.. what's is happening ?

10 Sep 2009 Paul Lin

How come the mean of a and b are not subtracted before divided by norm? I'm assuming the result is a normalized norm , please corect me if I'm wrong.

23 Mar 2008 Steffen B.

Very useful for my term project, thanks.

19 Apr 2006 §õ ©_À·

try it

17 Jan 2006 m g  
09 Jun 2004 Neil King

Excellent, this is exactly what i was looking for!!! Ive been trying to correlate optical field profiles and this is the best tool that ive found

Updates
10 Jun 2004

Misspell correction

16 Aug 2004

Misspell correction.
Add help.

Contact us