diag(.) does not work
5 views (last 30 days)
Show older comments

diag function works in a wrong way as shown in the figure. How can i fix it?
2 Comments
Answers (2)
Walter Roberson
on 27 Oct 2018
I suspect you accidentally assigned zeros to a variable named diag, so your call is indexing rather than invoking the function.
0 Comments
See Also
Categories
Find more on Matrix Indexing in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!