CrossCorrelation - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


SignalProcessing

  

CrossCorrelation

  

estimate the cross-correlation of two arrays containing samples

 

Calling Sequence

Parameters

Options

Description

Thread Safety

Examples

Compatibility

Calling Sequence

CrossCorrelation(A, B, lowerlag)

Parameters

A, B

-

Arrays of real or complex numeric values; the signals

lowerlag

-

integer (optional) for the lower value (default is 0) of the range of lags at which the correlation estimates are computed

Options

• 

container : Array, predefined Array for holding result

Description

• 

The CrossCorrelation(A, B) command estimates the cross-correlation of the Vectors A and B of length M and N respectively. An Array of length M+N1 containing the result is returned.

• 

The cross-correlation is defined by the formula

Ck=i=1MAi&conjugate0;Bk+i+lowerlag

  

for 1k and kM+N1. Here, Bi is taken to be 0, for N<i.

• 

Before the code performing the computation runs, Maple converts A and B to a hardware datatype, first attempting float[8] and subsequently complex[8], unless they already have one of these datatypes. For this reason, it is most efficient if they have one of these datatypes beforehand. The output will have the datatype that the computation is performed in.

• 

If the container=C option is provided, then the results are put into C and C is returned. With this option, no additional memory is allocated to store the result. The container must be an Array of size M+N1 having datatype float[8] if A and B are real, and complex[8] otherwise.

Thread Safety

• 

The SignalProcessing[CrossCorrelation] command is thread-safe as of Maple 17.

• 

For more information on thread safety, see index/threadsafe.

Examples

withSignalProcessing&colon;

aGenerateUniform10&comma;1&comma;1

a0.9958675736749190.4083375294118190.167610888327636−0.2468588373222460.432866472071836−0.4399798582161470.4329013102693530.481379433115581−0.4776970633728260.0288390346482901

(1)

bGenerateUniform7&comma;1&comma;1

b−0.545369867754208−0.3261160447254520.6263739238191340.559925029969611−0.373917395136553−0.09195902641578850.819334052606265

(2)

CrossCorrelationa&comma;b

−0.476222338403256−0.2831385282059771.167114395502920.187253489989328−0.2725932223088070.2429858302900160.8159482149982400.0.0.0.0.0.0.0.0.

(3)

CrossCorrelationa&comma;b&comma;0

−0.476222338403256−0.2831385282059771.167114395502920.187253489989328−0.2725932223088070.2429858302900160.8159482149982400.0.0.0.0.0.0.0.0.

(4)

CrossCorrelationa&comma;b&comma;9

−0.01572794051229700.251116712365011−0.0886811416019255−0.6761461737140310.1220412591554200.624073878396842−0.152173745069526−0.5836547502090530.329508750662104−0.476222338403256−0.2831385282059771.167114395502920.187253489989328−0.2725932223088070.2429858302900160.815948214998240

(5)

cArray1..numelemsa+numelemsb1&comma;datatype=float8&colon;

CrossCorrelationa&comma;b&comma;container=c

−0.476222338403256−0.2831385282059771.167114395502920.187253489989328−0.2725932223088070.2429858302900160.8159482149982400.0.0.0.0.0.0.0.0.

(6)

c

−0.476222338403256−0.2831385282059771.167114395502920.187253489989328−0.2725932223088070.2429858302900160.8159482149982400.0.0.0.0.0.0.0.0.

(7)

Compatibility

• 

The SignalProcessing[CrossCorrelation] command was introduced in Maple 17.

• 

For more information on Maple 17 changes, see Updates in Maple 17.

See Also

SignalProcessing[AutoCorrelation]

SignalProcessing[Convolution]