MATLAB Function Reference
  Go to function:
    Search    Help Desk 
corrcoef    See Also

Correlation coefficients

Syntax

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 zeroth lag of the covariance function, that is, the zeroth lag of xcov(x,'coeff') packed into a square array.

S = corrcoef(x,y) where x and y are column vectors is the same as corrcoef([x y]).

See Also

xcorr, xcov in the Signal Processing Toolbox, and:

cov         Covariance matrix

mean        Average or mean value of arrays

std         Standard deviation



[ Previous | Help Desk | Next ]