DSPRelated.com
Forums

Cross correlation

Started by Thomas Patrick February 11, 2005

Hi,

I would like to perform cross correlation of two finite lenght sequences x1 and x2. lenght of x1 and x2 are 256000 and 1000 respectively. y = xcorr(x1, x2) perfoms cross correlation but as length x2 is 1000 Matlab padded it with extra zeros to match the length of sequence x1. Can I perform this operation without matlab padding with extra zeros. Padded with extra zeros to match other sequence does effect the output result y ??

regards,

Thomas.



Hi;
Padding doesn't affect the result.
The answer is a sum of products of the form:
sum (x1(n)*x2(n+m)).
n
Usually, multiply by zero ads nothing.

Joe Sababa

BSTeX - Equation viewer for Matlab
http://www.geocities.com/bstex2001/

--- Thomas Patrick <> wrote:

>
> Hi,
>
> I would like to perform cross correlation of
> two finite lenght sequences x1 and x2. lenght of x1
> and x2 are 256000 and 1000 respectively. y =
> xcorr(x1, x2) perfoms cross correlation but as
> length x2 is 1000 Matlab padded it with extra zeros
> to match the length of sequence x1. Can I perform
> this operation without matlab padding with extra
> zeros. Padded with extra zeros to match other
> sequence does effect the output result y ??
>
> regards,
>
> Thomas. >

__________________________________