フィルターのクリア

How to reflect the element above the diagonal of a matrix to the lower diagonal ?

6 ビュー (過去 30 日間)
Tuong Nguyen Minh
Tuong Nguyen Minh 2020 年 7 月 17 日
編集済み: Matt J 2020 年 7 月 19 日
How could I reflect all the upper element of a square matrix of size K = 3 to the lower side
Like this ?
Thank you very much

採用された回答

Matt J
Matt J 2020 年 7 月 17 日
編集済み: Matt J 2020 年 7 月 17 日
b=triu(a)+triu(a,1).'; %the result
  2 件のコメント
Tuong Nguyen Minh
Tuong Nguyen Minh 2020 年 7 月 19 日
Why we use triu(a,1).' with the dot instead of triu(a,1)'
When I check it there was not much different, but is this dot usage a prefer engineering practice ?
Matt J
Matt J 2020 年 7 月 19 日
編集済み: Matt J 2020 年 7 月 19 日
.' means transpose
Without the dot, it is conjugate tranpose
As long as your matrices are real-valued, they should give the same result.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeOperating on Diagonal Matrices についてさらに検索

製品


リリース

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by