diag(.) does not work
Mostrar comentarios más antiguos
Respuestas (2)
Walter Roberson
el 27 de Oct. de 2018
1 voto
I suspect you accidentally assigned zeros to a variable named diag, so your call is indexing rather than invoking the function.
madhan ravi
el 27 de Oct. de 2018
Try
clear all
x=[8 1 6;3 5 7;4 9 2]
diag(x)
Categorías
Más información sobre Matrix Indexing en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
