Create a row vector of the diagonal elements from matrix.

23 visualizaciones (últimos 30 días)
So I am knew to MATLAB and have a question reguarding matricies.
I'm wondeirng how to create a row vector from the diagonal values (Top left to bottom right) from a matrix (I'm using a 6x6 matrix).
Any advice would be much appreaciated.
Thanks,
Ben.

Respuesta aceptada

Star Strider
Star Strider el 17 de Oct. de 2020
Meet the diag function!
  2 comentarios
Benjamin Nienhouse
Benjamin Nienhouse el 17 de Oct. de 2020
it works, thanks guys so much
Star Strider
Star Strider el 17 de Oct. de 2020
My pleasure!
If my Answer helped you solve your problem, please Accept it!
.

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.

Community Treasure Hunt

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

Start Hunting!

Translated by