How to partition a matrix into components that are independent?

7 ビュー (過去 30 日間)
MJ
MJ 2014 年 5 月 26 日
コメント済み: Star Strider 2014 年 5 月 26 日
I'm going to partition a symmetric matrix (covariance matrix) into columns/rows that are independent. Any help is appreciated.
  2 件のコメント
Mahdi
Mahdi 2014 年 5 月 26 日
Do you mean that you want to extract certain values (rows/columns) and define them as new variables?
MJ
MJ 2014 年 5 月 26 日
No. I have a symmetric matrix, a covariance matrix (40x40), which includes linearly dependent variables. I'm going to find variables that are linearly correlated, or those that are independent.

サインインしてコメントする。

回答 (2 件)

Star Strider
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 件のコメント
MJ
MJ 2014 年 5 月 26 日
No. I have a cov matrix (40x40) that includes several linearly dependent variables, so I'm trying to find those variables.
Star Strider
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
Kelly Kearney 2014 年 5 月 26 日
help corr
Will calculate linear correlation between columns of a matrix.

カテゴリ

Help Center および File ExchangeCorrelation and Convolution についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by