SignalProcessing
AutoCorrelation
estimate the autocorrelation of an array of samples
Calling Sequence
Parameters
Options
Description
Thread Safety
Examples
Compatibility
AutoCorrelation(A)
A
-
Array with complex or real numeric values; the signal
container : Array, predefined Array for holding result
scaling : none, biased or unbiased
The AutoCorrelation(A) command estimates the autocorrelation of the Array A of length N, storing the result in an Array C having the same length, which is then returned.
The un-scaled autocorrelation of Array A of length N and initial index 1 is defined by the formula
Ck=∑i=1N−k+1⁡Ai&conjugate0;⁢Ai+k−1
for each k from 1 to N. Note that this routine computes estimates for positive lags only, since the autocorrelation for a negative lag value is the complex conjugate of the autocorrelation for the equivalent positive lag.
The formula shown above is for the default value of the scaling option, none. If scaling is set to biased, then each value of C is scaled by 1N. If scaling is set to unbiased, then the k-th element of C is scaled by 1N−k+1.
Before the code performing the computation runs, Maple converts A to a hardware datatype, first attempting float[8] and subsequently complex[8], unless it already has one of these datatypes. For this reason, it is most efficient if A has one of these datatypes beforehand.
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 the same size and datatype as A.
The SignalProcessing[AutoCorrelation] command is thread-safe as of Maple 17.
For more information on thread safety, see index/threadsafe.
with⁡SignalProcessing:
a≔GenerateUniform⁡10,−1,1
a≔0.9958675736749190.4083375294118190.167610888327636−0.2468588373222460.432866472071836−0.4399798582161470.4329013102693530.481379433115581−0.4776970633728260.0288390346482901
AutoCorrelation⁡a
2.27663599328728−0.08940168484807420.02996061279623890.181340544436337−0.0143240359417695−0.05030019510323640.5404912662205170.289162265624793−0.4639469552938260.0287198594623196
c≔Array⁡1..numelems⁡a,datatype=float8:
AutoCorrelation⁡a,container=c
c
AutoCorrelation⁡a,scaling=biased
0.227663602721180−0.008940168618026310.002996061324268680.0181340547138522−0.00143240361552143−0.005030019585276770.05404912742744650.0289162269933646−0.04639469622071740.00287198598902788
AutoCorrelation⁡a,scaling=unbiased,container=c
0.227663599328728−0.009933520538674910.003745076599529860.0259057920623339−0.00238733932362825−0.01006003902064730.1351228165551290.0963874218749309−0.2319734776469130.0287198594623196
The SignalProcessing[AutoCorrelation] command was introduced in Maple 17.
For more information on Maple 17 changes, see Updates in Maple 17.
See Also
SignalProcessing[Convolution]
SignalProcessing[CrossCorrelation]
Download Help Document