Scilab Home page | Wiki | Bug tracker | Forge | Mailing list archives | ATOMS | File exchange
Please login or create an account
Change language to: English - Français - Português - 日本語 -

Please note that the recommended version of Scilab is 6.0.0. This page might be outdated.
See the recommended documentation of this function

Справка Scilab >> Signal Processing > xcov

xcov

Computes discrete auto or cross covariance

Calling Sequence

[c [,lagindex]] = xcov(x [,maxlags [,scaling]])
[c [,lagindex]] = xcov(x,y [,maxlags [,scaling]])

Parameters

x

a vector of real or complex floating point numbers.

y

a vector of real or complex floating point numbers. The default value is x.

maxlags

a scalar with integer value greater than 1. The default value is n. Where n is the maximum of the x and y vector length.

scaling

a character string with possible value: "biased", "unbiased", "coeff", "none". The default value is "none".

c

a vector of real or complex floating point numbers with same orientation as x.

lagindex

a row vector, containing the lags index corresponding to the c values.

Description

  • c=xcov(x) computes the un-normalized discrete covariance: and return in c the sequence of covariance lags with n is the length of x
  • xcov(x,y) computes the un-normalized discrete cross covariance: and return in c the sequence of cross covariance lags with n is the maximum of x and y length's.

If the maxlags argument is given xcov returns in c the sequence of covariance lags . If maxlags is greater than length(x), the first and last values of c are zero.

The scaling argument decribes how is normalized before being returned in c:

  • "biased":c=/n.
  • "unbiased":c=./(n-(-maxlags:maxlags)).
  • "coeff":c=/(norm(x)*norm(y)).

Remark

The corr function computes the "biased" covariance of x and y and only return in c the sequence of covariance lags .

Method

This function computes using xcorr(x-mean(x),y-mean(y),...).

Examples

t = linspace(0, 100, 2000);
                y = 0.8 * sin(t) + 0.8 * sin(2 * t);
                [c, ind] = xcov(y, "biased");
                plot(ind, c)

See Also

Authors

  • Serge Steer, INRIA

Used Functions

xcorr

History

ВерсияОписание
5.4.0 xcov added.
Scilab Enterprises
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Thu Oct 02 14:01:07 CEST 2014