Creating a vector from the diagonal values of a square matrix
40 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Kourosh
el 30 de Jul. de 2014
Respondida: Ahmet Cecen
el 30 de Jul. de 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 comentarios
Respuesta aceptada
Ahmet Cecen
el 30 de Jul. de 2014
vector=diag(matrix);
check help diag for more detailed information.
0 comentarios
Más respuestas (0)
Ver también
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!