Function Reference
— Function File: cor (x, y)

Compute correlation.

The (i, j)-th entry of cor (x, y) is the correlation between the i-th variable in x and the j-th variable in y.

          corrcoef(x,y) = cov(x,y)/(std(x)*std(y))

For matrices, each row is an observation and each column a variable; vectors are always observations and may be row or column vectors.

cor (x) is equivalent to cor (x, x).

Note that the corrcoef function does the same as cor.