How to partition a matrix into components that are independent?
조회 수: 4 (최근 30일)
이전 댓글 표시
I'm going to partition a symmetric matrix (covariance matrix) into columns/rows that are independent. Any help is appreciated.
댓글 수: 2
Mahdi
2014년 5월 26일
Do you mean that you want to extract certain values (rows/columns) and define them as new variables?
답변 (2개)
Star Strider
2014년 5월 26일
Is this what you want to do?
X = rand(4,4);
Xr = X(2,:) % Extract second row
Xc = X(:,3) % Extract third column
댓글 수: 2
Star Strider
2014년 5월 26일
The easiest way is probably to use the core MATLAB function corrcoef. The way I would suggest using it is to use the P (probability) values:
[R,P] = corrcoef(X)
[pr,pc] = find(P < 0.05)
and search for the lowest ones, or those that exceeded your limits, for instance P < 0.05 or lower. The find function will give you the row and column indices for those values. There may be other criteria, but this has the advantage of having statistical validity.
Kelly Kearney
2014년 5월 26일
help corr
Will calculate linear correlation between columns of a matrix.
댓글 수: 0
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!