Creating a vector from the diagonal values of a square matrix
34 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Kourosh
le 30 Juil 2014
Réponse apportée : Ahmet Cecen
le 30 Juil 2014
Hello,
Does anybody know how I can read the diagonal values of a square matrix and create a vector (1:n) from those values?
Cheers,
Cyrus
0 commentaires
Réponse acceptée
Ahmet Cecen
le 30 Juil 2014
vector=diag(matrix);
check help diag for more detailed information.
0 commentaires
Plus de réponses (0)
Voir également
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!