summaryrefslogtreecommitdiff
path: root/macros/xcov1.sci
diff options
context:
space:
mode:
authorAbhinav Dronamraju2017-11-27 15:25:37 +0530
committerAbhinav Dronamraju2017-11-27 15:25:37 +0530
commitb7969c62478edc84055e71df9fed140402406396 (patch)
tree048b7c76423fe27dee2e31a52bae93c95883614e /macros/xcov1.sci
parent2bb28947f9736c1c65dd338bf1bc8fcc2570b22d (diff)
parentd972a68bc5b3c4c059b70e4f8cd64a64538c2be8 (diff)
downloadFOSSEE-Signal-Processing-Toolbox-b7969c62478edc84055e71df9fed140402406396.tar.gz
FOSSEE-Signal-Processing-Toolbox-b7969c62478edc84055e71df9fed140402406396.tar.bz2
FOSSEE-Signal-Processing-Toolbox-b7969c62478edc84055e71df9fed140402406396.zip
Merge with upstream
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)