How to get Ones along the diagonal
Show older comments
I need a matrix of size 5x5 with ones along the diagonal and remaining values to be zero. How to get this.
Answers (1)
David J. Mack
on 29 Dec 2016
Edited: David J. Mack
on 29 Dec 2016
Categories
Find more on Operating on Diagonal Matrices in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!