Creating a vector from the diagonal values of a square matrix
32 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
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 Commenti
Risposta accettata
Ahmet Cecen
il 30 Lug 2014
vector=diag(matrix);
check help diag for more detailed information.
0 Commenti
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Operating on Diagonal Matrices in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!