CNB_COVAR Purpose
This function computes the covariance matrix for a set of
multidimensional data. It optionally returns the principal axes, of
the distribution, along with the variance along each principal
axis.
The principal axes and variances describe the orientation and size
of the "error ellipse" for multivariate gaussians.
Input
data: An (ndimension) x (n point) data array.
Keywords
paxis: On output, will hold the principal axes of the distribution.
An (ndim x ndim) array. The ith row of this array lists the ith
principal axis.
pvar: On output, will hold the variance along each principal axis.
An (ndim) vector.
mean: On output, will hold the mean of the distribution.
weights: An option (npoint) array that will weight each data point
Output
The covariance array. An (ndimension) x (ndimension) array.
Modification History
March 2010: Written by Chris Beaumont
December 2010: Added paxis, pvar, and mean keywords. cnb.