Previous Up Next

5.23.1  Cross-correlation of two signals : cross_correlation

cross_correlation takes two arguments, a complex vector v of length n and a complex vector w of length m . The returned value is the complex vector z=vw of length N=n+m−1 which is the cross-correlation of the two input vectors, i.e. such that the following holds :

zk=
N−1
i=k
vik
 wi,   k=0,1,…,N−1, 

where

v=[v0,v1,…,vn−1,
 
 
0,0,…,0


m−1
]  and  w=[
 
 
0,0,…,0


n−1
,w0,w1,…,wm−1]. 

For example, input :

cross_correlation([1,2],[3,4,5])

Output :

[6.0,11.0,14.0,5.0]

Previous Up Next