Create a row vector of the diagonal elements from matrix.

20 vues (au cours des 30 derniers jours)
Benjamin Nienhouse
Benjamin Nienhouse le 17 Oct 2020
Commenté : Star Strider le 17 Oct 2020
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.

Réponse acceptée

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

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Operating on Diagonal Matrices dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by