diag(.) does not work
古いコメントを表示
回答 (2 件)
Walter Roberson
2018 年 10 月 27 日
1 投票
I suspect you accidentally assigned zeros to a variable named diag, so your call is indexing rather than invoking the function.
madhan ravi
2018 年 10 月 27 日
Try
clear all
x=[8 1 6;3 5 7;4 9 2]
diag(x)
カテゴリ
ヘルプ センター および File Exchange で Matrix Indexing についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
