What type of function Matlab has help to construct symmetric matrix?
2 次查看(过去 30 天)
显示 更早的评论
What type of built-in functions (such as function Toeplitz) that come with Matlab help us to construct a symmetric matrix (not random) ?
2 个评论
David Goodmanson
2020-1-30
Hi Omar,
any matrix of your choosing can be made into a symmetric matrix of course with
A = (A+A.')/2
采纳的回答
Steven Lord
2020-1-30
Several of the matrices you can create using the gallery function are symmetric, and some have other interesting and/or useful properties.
更多回答(3 个)
James Tursa
2020-1-30
If no specific properties needed, then you could use
n = the desired size
M = rand(n);
M = M + M';
Walter Roberson
2020-1-30
squareform() can convert a vector of values representing the upper triangle, into a full symmetric matrix.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Creating and Concatenating Matrices 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!