Got Questions? Get Answers.
Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
cross correlation of complex vectors

Subject: cross correlation of complex vectors

From: burcu

Date: 11 May, 2012 22:11:19

Message: 1 of 4

I have 2 vector 631*1 they all have complex numbers. I want to find cross correlation of these vectors. But I used xcorr function and xcorr of each vector didn't give 1.

Subject: cross correlation of complex vectors

From: Roger Stafford

Date: 12 May, 2012 00:05:32

Message: 2 of 4

"burcu " <guldikenb@gmail.com> wrote in message <jok2q7$s66$1@newscl01ah.mathworks.com>...
> I have 2 vector 631*1 they all have complex numbers. I want to find cross correlation of these vectors. But I used xcorr function and xcorr of each vector didn't give 1.
- - - - - - - - -
  Check the normalization option in the documentation for xcorr.

Roger Stafford

Subject: cross correlation of complex vectors

From: burcu

Date: 25 May, 2012 14:51:07

Message: 3 of 4

"Roger Stafford" wrote in message <jok9gc$nt4$1@newscl01ah.mathworks.com>...
> "burcu " <guldikenb@gmail.com> wrote in message <jok2q7$s66$1@newscl01ah.mathworks.com>...
> > I have 2 vector 631*1 they all have complex numbers. I want to find cross correlation of these vectors. But I used xcorr function and xcorr of each vector didn't give 1.
> - - - - - - - - -
> Check the normalization option in the documentation for xcorr.
>
> Roger Stafford

I find autocorrelation of two complex vector 1 with 'coeff' option but I don't know which equation it performs. When I make cross correlation of two different vector, Do I also use 'coeff'?

Subject: cross correlation of complex vectors

From: Greg Heath

Date: 8 Aug, 2012 11:08:15

Message: 4 of 4

"burcu " <guldikenb@gmail.com> wrote in message <jpo68r$t21$1@newscl01ah.mathworks.com>...
> "Roger Stafford" wrote in message <jok9gc$nt4$1@newscl01ah.mathworks.com>...
> > "burcu " <guldikenb@gmail.com> wrote in message <jok2q7$s66$1@newscl01ah.mathworks.com>...
> > > I have 2 vector 631*1 they all have complex numbers. I want to find cross correlation of these vectors. But I used xcorr function and xcorr of each vector didn't give 1.
> > - - - - - - - - -
> > Check the normalization option in the documentation for xcorr.
> >
> > Roger Stafford
>
> I find autocorrelation of two complex vector 1 with 'coeff' option but I don't know which equation it performs. When I make cross correlation of two different vector, Do I also use 'coeff'?

Sorry, I do not have xcorr. However, nncorr in the NN Toolbox can be used
as

autocorrx = N*nncorr(zscore(x),zscore(x),N-1)/(N-1)
crosscorrxy = N*nncorr(zscore(x),zscore(y),N-1)/(N-1)

when x and y are real and of length N. If they have the same length and are complex,

MY GUESS is
1.
autocorrx = N*nncorr(zscore(x),zscore(conj(x)),N-1)/(N-1)
crosscorrxy = N*nncorr(zscore(x),zscore(conj(y)),N-1)/(N-1)

2. If they are not the same length, the smaller should be zero padded

Hope this helps.

Greg

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us