Function navtk::calc_cov_weighted

Function Documentation

Matrix navtk::calc_cov_weighted(const Matrix &matrix, const Vector &weights)

Calculate the weighted covariance of a NxK matrix, where K is the number of samples and N the number of states.

Parameters
  • matrix – A square matrix (NxN).

  • weights – A vector of sample weights.

Returns

Weighted covariance.