What type of function Matlab has help to construct symmetric matrix?
Show older comments
What type of built-in functions (such as function Toeplitz) that come with Matlab help us to construct a symmetric matrix (not random) ?
2 Comments
James Tursa
on 30 Jan 2020
Any specific properties needed?
David Goodmanson
on 30 Jan 2020
Hi Omar,
any matrix of your choosing can be made into a symmetric matrix of course with
A = (A+A.')/2
Accepted Answer
More Answers (3)
James Tursa
on 30 Jan 2020
If no specific properties needed, then you could use
n = the desired size
M = rand(n);
M = M + M';
Walter Roberson
on 30 Jan 2020
1 vote
squareform() can convert a vector of values representing the upper triangle, into a full symmetric matrix.
Omar B.
on 30 Jan 2020
0 votes
Categories
Find more on Creating and Concatenating Matrices in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!