This is documentation for Mathematica 5, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)

Documentation / Mathematica / Built-in Functions / Lists and Matrices / Structure Manipulation /

ListCorrelate

FilledSmallSquare ListCorrelate[ker, list] forms the correlation of the kernel ker with list.

FilledSmallSquare ListCorrelate[ker, list, k] forms the cyclic correlation in which the k element of ker is aligned with each element in list.

FilledSmallSquare ListCorrelate[ker, list, , ] forms the cyclic correlation whose first element contains list[[1]] ker[[]] and whose last element contains list[[-1]] ker[[]].

FilledSmallSquare ListCorrelate[ker, list, klist, p] forms the correlation in which list is padded at each end with repetitions of the element p.

FilledSmallSquare ListCorrelate[ker, list, klist, , , ... ] forms the correlation in which list is padded at each end with cyclic repetitions of the .

FilledSmallSquare ListCorrelate[ker, list, klist, padding, g, h] forms a generalized correlation in which g is used in place of Times and h in place of Plus.

FilledSmallSquare ListCorrelate[ker, list, klist, padding, g, h, lev] forms a correlation using elements at level lev in ker and list.

FilledSmallSquare With kernel and list , ListCorrelate[ker, list] computes , where the limits of the sum are such that the kernel never overhangs either end of the list.

FilledSmallSquare Example: ListCorrelate[x,y, a,b,c] LongRightArrow.

FilledSmallSquare For a one-dimensional list ListCorrelate[ker, list] is equivalent to ListConvolve[Reverse[ker], list].

FilledSmallSquare For higher-dimensional lists, ker must be reversed at every level.

FilledSmallSquare See notes for ListConvolve.

FilledSmallSquare Settings for and are negated in ListConvolve relative to ListCorrelate.

FilledSmallSquare Common settings for , in ListCorrelate are:

FilledSmallSquare See Section 3.8.5.

FilledSmallSquare Implementation Notes: see Section A.9.4.

FilledSmallSquare See also: ListConvolve, Partition, Inner, CellularAutomaton, PadLeft.

FilledSmallSquare New in Version 4.

Further Examples