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

3 ビュー (過去 30 日間)
Omar B.
Omar B. 2020 年 1 月 29 日
回答済み: Omar B. 2020 年 1 月 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 件のコメント
James Tursa
James Tursa 2020 年 1 月 30 日
Any specific properties needed?
David Goodmanson
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
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.
  1 件のコメント
Omar B.
Omar B. 2020 年 1 月 30 日
Great function . Thank you so much. It is what I need.

サインインしてコメントする。

その他の回答 (3 件)

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

サインインしてコメントする。


Walter Roberson
Walter Roberson 2020 年 1 月 30 日
squareform() can convert a vector of values representing the upper triangle, into a full symmetric matrix.
  1 件のコメント
Omar B.
Omar B. 2020 年 1 月 30 日
That is really helpful. Thank you so much.

サインインしてコメントする。


Omar B.
Omar B. 2020 年 1 月 30 日
Thank you so much . I really appreciate your help.

カテゴリ

Help Center および File ExchangeGet Started with MATLAB についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by