SPautoc
Routine

void SPautoc (const float x[], int Nx, float cor[], int Nt)
Purpose

Calculate the autocorrelation for a data sequence
Description
This routine calculate the autocorrelation for a given data vector.
Nx1i
cor[i] = SUM x[k] * x[k+i] , for 0 <= i < Nt.
k=0
This routine requires
(Nt+1)*(Nx+Nt/2) multiplies and
(Nt+1)*(Nx+Nt/2) adds.
Parameters

> const float x[]

Input data vector with Nx elements

> int Nx

Number of data points

< float cor[]

Autocorrelation vector with Nt elements. The element cor[i] is the
autocorrelation with lag i.

> int Nt

Number of autocorrelation terms
Author / revision
P. Kabal
/ Revision 1.8 2003/05/09
See Also
SPcorXpc,
SPcovar
Main Index libtsp