## ./

# cnb_covar.pro

## topcnb_covar

`result = cnb_covar(data, paxis=paxis, pvar=pvar, mean=mean, weights=weights)`

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.

### Parameters

- data

### Keywords

- paxis
- pvar
- mean
- weights

### Author information

- History:
March 2010: Written by Chris Beaumont December 2010: Added paxis, pvar, and mean keywords. cnb.

## File attributes

Modifcation date: | Thu Nov 10 11:31:13 2011 |

Lines: | 74 |