Table Of Contents


    Last Modified: March 15, 2017

    Computes the cross-correlation of the inputs.


    c = crosscorr(a)
    c = crosscorr(a, l)
    c = crosscorr(a, option)
    c = crosscorr(a, l, option)
    c = crosscorr(a, b)
    c = crosscorr(a, b, l)
    c = crosscorr(a, b, option)
    c = crosscorr(a, b, l, option)
    [c, d] = crosscorr(a)
    [c, d] = crosscorr(a, l)
    [c, d] = crosscorr(a, option)
    [c, d] = crosscorr(a, l, option)
    [c, d] = crosscorr(a, b)
    [c, d] = crosscorr(a, b, l)
    [c, d] = crosscorr(a, b, option)
    [c, d] = crosscorr(a, b, l, option)
    Legacy name: xcorr



    Vector or matrix of double-precision, floating-point or complex double-precision, floating-point numbers.


    Vector of double-precision, floating-point or complex double-precision, floating-point numbers.


    Controls the length of the cross-correlation. If a is a vector of length n, c = crosscorr(a, l) returns a vector of length 2*l+1. MathScript pads l with zeros when l is greater than or equal to n. l is an integer.


    Normalization method used for computing the cross-correlation between a and b. option is a string that accepts the following values.

    Name Description

    Applies biased normalization.


    Applies normalization such that the autocorrelation is 1 when the first input is 0.

    'none' (default)

    Does not apply normalization.


    Applies unbiased normalization.



    Cross-correlation between a and b. If a is a matrix, c = crosscorr(a) returns the cross-correlations of all combinations of columns of a. c is a vector or a matrix.


    Indexes of the cross-correlation. If you specify l, d is [-l, -l+1, ..., 0, ..., l-1, l]. d is a vector.

    A = [0.1, 0.2, 0.3, 0.4]
    C = crosscorr(A)

    Where This Node Can Run:

    Desktop OS: Windows

    FPGA: This product does not support FPGA devices

    Recently Viewed Topics