File: SPautoc.html

package info (click to toggle)
libtsp 3r0-1
  • links: PTS
  • area: non-free
  • in suites: potato, woody
  • size: 5,096 kB
  • ctags: 1,798
  • sloc: ansic: 14,464; sh: 1,217; makefile: 182
file content (61 lines) | stat: -rw-r--r-- 1,209 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
<HTML>
<HEAD>
<TITLE>TSP (libtsp/SP) - SPautoc</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFACD">
<H2>SPautoc</H2>
<HR>
<H4>Routine</H4>
<DL>
<DT>
void SPautoc (const float x[], int Nx, float cor[], int Nt)
</DL>
<H4>Purpose</H4>
<DL>
<DT>
Calculate the autocorrelation for a data sequence
</DL>
<H4>Description</H4>
This routine calculate the autocorrelation for a given data vector.
<PRE>
           Nx-1-i
  cor[i] =  SUM  x[k] * x[k+i] , for 0 &lt;= i &lt; Nt.
            k=0
</PRE>
<P>
This routine requires
<PRE>
  (Nt+1)*(Nx+Nt/2) multiplies and
  (Nt+1)*(Nx+Nt/2) adds.
</PRE>
<H4>Parameters</H4>
<DL>
<DT>
 -&gt; const float x[]
<DD>
Input data vector with Nx elements
<DT>
 -&gt; int Nx
<DD>
Number of data points
<DT>
&lt;-  float cor[]
<DD>
Autocorrelation vector with Nt elements.  The element cor[i] is the
autocorrelation with lag i.
<DT>
 -&gt; int Nt
<DD>
Number of autocorrelation terms
</DL>
<H4>Author / revision</H4>
P. Kabal  Copyright (C) 1996
/ Revision 1.5  1996/05/06
<H4>See Also</H4>
<A HREF="SPcorXpc.html">SPcorXpc</A>,
<A HREF="SPcovar.html">SPcovar</A>
<P>
<HR>
Main Index <A HREF="../libtsp.html">libtsp</A>
</BODY>
</HTML>