summaryrefslogtreecommitdiff
path: root/macros/xcov1.sci
diff options
context:
space:
mode:
Diffstat (limited to 'macros/xcov1.sci')
-rw-r--r--macros/xcov1.sci18
1 files changed, 18 insertions, 0 deletions
diff --git a/macros/xcov1.sci b/macros/xcov1.sci
index 4c1f37e..b0bff93 100644
--- a/macros/xcov1.sci
+++ b/macros/xcov1.sci
@@ -1,4 +1,22 @@
function [R,lag] = xcov1(X, Y, biasflag)
+// Compute covariance at various lags [=correlation(x-mean(x),y-mean(y))].
+//Calling Sequence
+//[R, lag] = xcov (X)
+//... = xcov (X, Y)
+//... = xcov (..., maxlag)
+//... = xcov (..., scale)
+//Parameters
+//X: Input vector
+//Y: if specified, compute cross-covariance between X and Y, otherwise compute autocovariance of X.
+//maxlag: is specified, use lag range [-maxlag:maxlag], otherwise use range [-n+1:n-1].
+//scale:
+// 'biased': for covariance=raw/N,
+// 'unbiased': for covariance=raw/(N-|lag|),
+// 'coeff': for covariance=raw/(covariance at lag 0),
+// 'none': for covariance=raw
+// 'none': is the default.
+//Description
+//Compute covariance at various lags [=correlation(x-mean(x),y-mean(y))]. Returns the covariance for each lag in the range, plus an optional vector of lags.
funcprot(0);
rhs = argn(2)