Borrar filtros
Borrar filtros

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

6 visualizaciones (últimos 30 días)
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

Respuesta aceptada

Matt J
Matt J el 17 de Jul. de 2020
Editada: Matt J el 17 de Jul. de 2020
b=triu(a)+triu(a,1).'; %the result
  2 comentarios
Tuong Nguyen Minh
Tuong Nguyen Minh el 19 de Jul. de 2020
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 el 19 de Jul. de 2020
Editada: Matt J el 19 de Jul. de 2020
.' means transpose
Without the dot, it is conjugate tranpose
As long as your matrices are real-valued, they should give the same result.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Operating on Diagonal Matrices en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by