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!
