Contents Previous Next Subchapters

Column-wise Correlation Of Matrices Using FFT
Syntax corr(gh)
See Also conv , polmul , filter

Description
Returns a matrix that is the column-wise correlation of g with h, where g and h are integer, real, double-precision, or complex matrices with the same column dimension. If ng and nh are the number of rows in the matrices g and h, respectively, the (k,j)-th element of the return value is
      ng
     -----                                      / 0        if i+k-ng < 1
     >      g    H          where  H         = <  0        if i+k-ng > nh
     -----   i,j  i+k-ng,j          i+k-ng,j    \ h        otherwise
     i = 1                                         i+k-ng,j
The return value is a matrix with row dimension equal to ng + nh - 1 with the same type and column dimension as g. An FFT is used to compute the correlation.

Example
     g = {1, 1}
     h = {1, 1}
     corr(g, h)
returns
     {
     1 
     2 
     1 
     }