Compute correlation.
If each row of x and y is an observation and each column is a variable, the (i, j)-th entry of
corrcoef (
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))If called with one argument, compute
corrcoef (
x,
x)
.