diag(.) does not work
Ältere Kommentare anzeigen
Antworten (2)
Walter Roberson
am 27 Okt. 2018
1 Stimme
I suspect you accidentally assigned zeros to a variable named diag, so your call is indexing rather than invoking the function.
madhan ravi
am 27 Okt. 2018
Try
clear all
x=[8 1 6;3 5 7;4 9 2]
diag(x)
Kategorien
Mehr zu Matrix Indexing finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
