# corrcoef

## Purpose

Correlation coefficients.

## Synopsis

    S = corrcoef(X)

## Description

`S = corrcoef(X)` returns a matrix of correlation coefficients calculated from an input matrix whose rows are observations and whose columns are variables. The matrix `S = corrcoef(x)` is related to the covariance matrix`C = cov(x)` by

`corrcoef(X)` is the 0-th lag of the covariance function, that is, the 0-th lag of `xcov(x,'coeff')` packed into a square array.

`corrcoef` removes the mean from each column before calculating the results.

## See Also

`cov`, `mean`, `std`

`xcorr`,`xcov` in the Signal Processing Toolbox

(c) Copyright 1994 by The MathWorks, Inc.