-
Notifications
You must be signed in to change notification settings - Fork 192
Description
The PR #172 introduces a function to compute covariances of elements for a vector of an array.
Here Iw ould like to discuss the API for a function cov
that computes the covariance between 2 vectors or matrices x
and y
.
The API could be:
res = cov(x, y, dim[, maskx, masky][, corrected])
x
, y
: Shall be vectors or matrices of the same type, with the condition that size(x, dim) == size(y, dim)
maskx
, masky
(optional): Shall be scalars, vectors, or matrices of type logical
. Vectors and matrices maskx
and masky
must be of the same shape as the corresponding vectors and matrices x
and y
, respectively.
If one of the masks is a scalar, then both masks are scalar (mainly to avoid a large number of functions with scalar masks).
If one of the masks is a vector or a matrix, then none or both masks must be provided.
corrected
(optional): Shall be a scalar of type logical
.