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

2 次查看(过去 30 天)
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 ?

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Operating 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