wcovar
Syntax
wcovar(X, Y, weights)
Arguments
X, Y and weights are vectors of the same size.
Details
Calculate the weighted covariance of X and Y with weights as the weight vector.
Examples
x=7 4 5 8 9 3 3 5 2 6 12 1 0 -5 32
y=1.1 7 8 9 9 5 4 8.6 2 1 -9 -3 5 8 13
wt=iterate(1,0.9,x.size())
wcovar(x,y,wt);
// output
4.201899