crosscorr (MathScript RT Module Function)

LabVIEW 2012 MathScript RT模块帮助

版本日期:June 2012



Owning Classes: spectral analysis and statistics

Requires: MathScript RT Module


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


Computes the cross-correlation of the inputs.



Name Description
a Specifies a vector or matrix of double-precision, floating-point or complex double-precision, floating-point numbers.
b Specifies a vector of double-precision, floating-point or complex double-precision, floating-point numbers.
l 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. LabVIEW pads l with zeros when l is greater than or equal to n. l is an integer.
option Specifies the normalization method to use to compute the cross-correlation between a and b. option is a string that accepts the following values.

'biased' Applies biased normalization.
'coeff' Applies normalization such that the autocorrelation is 1 when the first input is 0.
'none' (default) Does not apply normalization.
'unbiased' Applies unbiased normalization.


Name Description
c Returns the 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 vector or matrix.
d Returns the indexes of the cross-correlation. If you specify l, d is [-l, -l+1, ..., 0, ..., l-1, l]. d is a vector.


The following table lists the support characteristics of this function.

Supported in the LabVIEW Run-Time Engine Yes
Supported on RT targets Yes
Suitable for bounded execution times on RT Yes


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

Related Topics