필터 지우기
필터 지우기

correlation matrix from pairwise correlations of matrices

조회 수: 8 (최근 30일)
OH
OH 2016년 8월 23일
답변: OH 2016년 8월 23일
Hi, I have a set of n-by-n matrices and I would like to do pairwise correlations of all matrices and to get a correlation matrix containing persons r for all pairwise correlations as output. Is there a fast way to do the pairwise correlations for all possible pairs? I was thinking of a for-loop, but I am not sure how to write it.
Thanks

채택된 답변

Thorsten
Thorsten 2016년 8월 23일
Convert each matrix to a column vector of X, using (:), and then run
corrcoef(X)

추가 답변 (1개)

OH
OH 2016년 8월 23일
Thanks!

카테고리

Help CenterFile Exchange에서 Correlation and Convolution에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by