What type of function Matlab has help to construct symmetric matrix?

2 vues (au cours des 30 derniers jours)
Omar B.
Omar B. le 29 Jan 2020
What type of built-in functions (such as function Toeplitz) that come with Matlab help us to construct a symmetric matrix (not random) ?
  2 commentaires
James Tursa
James Tursa le 30 Jan 2020
Any specific properties needed?
David Goodmanson
David Goodmanson le 30 Jan 2020
Hi Omar,
any matrix of your choosing can be made into a symmetric matrix of course with
A = (A+A.')/2

Connectez-vous pour commenter.

Réponse acceptée

Steven Lord
Steven Lord le 30 Jan 2020
Several of the matrices you can create using the gallery function are symmetric, and some have other interesting and/or useful properties.
  1 commentaire
Omar B.
Omar B. le 30 Jan 2020
Great function . Thank you so much. It is what I need.

Connectez-vous pour commenter.

Plus de réponses (3)

James Tursa
James Tursa le 30 Jan 2020
If no specific properties needed, then you could use
n = the desired size
M = rand(n);
M = M + M';
  1 commentaire
Omar B.
Omar B. le 30 Jan 2020
Thank you so much. I just want to learn more about the built - in function that can we use to create symmetric function.

Connectez-vous pour commenter.


Walter Roberson
Walter Roberson le 30 Jan 2020
squareform() can convert a vector of values representing the upper triangle, into a full symmetric matrix.

Omar B.
Omar B. le 30 Jan 2020
Thank you so much . I really appreciate your help.

Catégories

En savoir plus sur Creating and Concatenating Matrices 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!

Translated by