How to create positive semidefinite matrix from random value ?
36 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Waqar Ahmed
le 8 Jan 2021
Réponse apportée : Walter Roberson
le 8 Jan 2021
I form a matrix A in matlab as
A=rand(50);
I want to know how to make symmetric matrix using equation
A=0.5 *(A+A');
but how can I make it positive semidefinite matrix?
0 commentaires
Réponse acceptée
Walter Roberson
le 8 Jan 2021
A = rand(50);
A = 0.5 *(A+A');
issymmetric(A)
d = eig(A)
all(imag(d) == 0 & d >= 0)
APos = A'*A;
issymmetric(APos)
d = eig(APos)
all(imag(d) == 0 & d >= 0)
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Particle & Nuclear Physics dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!