| Signal Processing Toolbox | Search  Help Desk |
| corrcoef | See Also |
Correlation coefficient matrix.
Syntax
C = corrcoef(X) C = corrcoef(X,Y)
Description
corrcoef returns a matrix of correlation coefficients calculated from an input matrix whose rows are observations and whose columns are variables. If C = cov(X), then corrcoef(X) is the matrix whose element (i, j) is
C = corrcoef(X)
is the zeroth lag of the covariance function, that is, the zeroth lag of xcov(x,'coeff') packed into a square array.
C = corrcoef(X,Y)
is the same as corrcoef([X Y]), that is, it concatenates X and Y in the row direction before its computation.
corrcoef removes the mean from each column before calculating the results. See the xcorr function for cross-correlation options.
The corrcoef function is part of the standard MATLAB language.
See Also
cov |
Covariance matrix. |
mean |
Average value (see the online MATLAB Function Reference). |
median |
Median value (see the online MATLAB Function Reference). |
std |
Standard deviation (see the online MATLAB Function Reference). |
xcorr |
Cross-correlation function estimate. |
xcov |
Cross-covariance function estimate (equal to mean-removed cross-correlation). |