Cross correlation of Matrix columns
4 views (last 30 days)
Show older comments
Hi,
thank you in advance for taking the time to read this. I have a problem for which I'm sure there is an easy answer but I cannot find it. I have a matrix M (n,m). Each column represents a different experimenter and each row different score. I would like to correlate the scores of each experimenter with the scores of themselves and all other experimenters, and create effectively a new matrix Cor (m,m). It's element of this matrix will be a single value corresponding to the Pearson correlation between each column pair. The diagonal (from m,1 to 1,m) will contain the auto correlations of all columns of matrix M. I understand that have this square matrix is redundant (mirror to the other half) but it looks good when shown as a coloured correlation Matrix. I think I can do that with several lines of code but I'd like to know if there's an easy way.
Best, Antonis
5 Comments
Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!