MATLAB: Interpreting corrcoeff (contains just 0s and 1s)

corrcoeff

Dear community,
Quick question, what does it mean when the matrix of p-values given using corrcoeff contain only zeroes (along with the 1s in the diagonal)? I have gotten very small numbers before (i.e. E-43) and was wondering if something went wrong.
Thanks in advance! J

Best Answer

It means your data are highly correlated.
For example creating a matrix of identical columns:
x = rand(10,1);
X = repmat(x, 1, 5);
[R,P] = corrcoef(X)
R is a matrix of ones and P has ones on the diagonal and zeros (or very small values) elsewhere.