How to partition a matrix into components that are independent?
Show older comments
Answers (2)
Star Strider
on 26 May 2014
Is this what you want to do?
X = rand(4,4);
Xr = X(2,:) % Extract second row
Xc = X(:,3) % Extract third column
2 Comments
MJ
on 26 May 2014
Star Strider
on 26 May 2014
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
on 26 May 2014
help corr
Will calculate linear correlation between columns of a matrix.
Categories
Find more on Sparse Matrices in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!