how to create the number of equations from a correlation matrix by excluding the most correlated variables?
19 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Irina
le 21 Sep 2025 à 10:00
Commenté : Matt J
le 21 Sep 2025 à 12:22
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 commentaires
Réponse acceptée
Matt J
le 21 Sep 2025 à 10:40
Modifié(e) : Matt J
le 21 Sep 2025 à 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
2 commentaires
Plus de réponses (0)
Voir également
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!