Company Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI

xcorr (MathScript Function) (Windows, Not in Base Package)

LabVIEW 8.2 Help
August 2006

NI Part Number:
371361B-01

»View Product Info

Member of the spectral analysis and the statistics classes.

Syntax

c = xcorr(a)

c = xcorr(a, l)

c = xcorr(a, option)

c = xcorr(a, l, option)

c = xcorr(a, b)

c = xcorr(a, b, l)

c = xcorr(a, b, option)

c = xcorr(a, b, l, option)

[c, d] = xcorr(a)

[c, d] = xcorr(a, l)

[c, d] = xcorr(a, option)

[c, d] = xcorr(a, l, option)

[c, d] = xcorr(a, b)

[c, d] = xcorr(a, b, l)

[c, d] = xcorr(a, b, option)

[c, d] = xcorr(a, b, l, option)

Description

Computes the cross-correlation of the inputs.

Examples

Inputs

Name Description
a Specifies a vector or matrix.
b Specifies a vector.
l Controls the length of the cross-correlation. If a is a vector of length n, c = xcorr(a, l) returns a vector of length 2*l+1. LabVIEW pads l with zeros when l is greater than or equal to n.
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 = xcorr(a) returns the cross-correlations of all combinations of columns of a. c is vector or matrix.
d Returns the indices of the cross-correlation. If you specify l, d is [-l, -l+1, ..., 0, ..., l-1, l]. d is a vector.

Examples

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

Related Topics

corrcoef
xcorr2


Resources


 

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