How to construct a "ones" matrix with zero blocks in the diagonal
Show older comments
Hi all,
I am trying to construct the follwoing matrix and any help would be highly appreciated.

Thank you.
Accepted Answer
More Answers (1)
repelem(1-eye(4),4,4)
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!