How to create positive semidefinite matrix from random value ?
36 次查看(过去 30 天)
显示 更早的评论
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 个评论
采纳的回答
Walter Roberson
2021-1-8
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 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Particle & Nuclear Physics 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!