Skip to content

Proposal for covariance between 2 vectors or matrices #174

@jvdp1

Description

@jvdp1

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    topic: mathematicslinear algebra, sparse matrices, special functions, FFT, random numbers, statistics, ...

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions