how to create the number of equations from a correlation matrix by excluding the most correlated variables?
19 ビュー (過去 30 日間)
古いコメントを表示
I have a correlation matrix with several variables with different values. I would like to create all the pairs between the variables. In equestion i don't have to add the most correlated varaibles which are forbidden pairs (>0.5 and <-0.5)
0 件のコメント
採用された回答
Matt J
2025 年 9 月 21 日 10:40
編集済み: Matt J
2025 年 9 月 21 日 10:43
That sounds like a bad idea. Normally, in MATLAB, you wouldn't write your equations in scalar form. You would write a matrix equation in terms of the covariance matrix itself, so that the variables don't have to be individually enumerated.
To zero out certain elements of the matrix, you can just do, e.g.,
Matrix=2*rand(5)-1
Matrix(abs(Matrix)>0.5) = 0
その他の回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!