Create a row vector of the diagonal elements from matrix.

22 Ansichten (letzte 30 Tage)
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.

Akzeptierte Antwort

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

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Operating on Diagonal Matrices finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by