Company Events Academic Community Support Solutions Products & Services Contact NI MyNI

crosscorr (MathScript RT Module Function)

LabVIEW 2012 MathScript RT Module Help

Edition Date: June 2012

Part Number: 373123C-01

»View Product Info
Download Help (Windows Only)

Owning Classes: spectral analysis and statistics

Requires: MathScript RT Module

Syntax

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

Description

Computes the cross-correlation of the inputs.

Examples

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.

Outputs

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.

Details

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

Examples

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

Related Topics

corrcoeff
crosscorr2d


 

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
Add Comments 1 2 3 4 5 submit