MATLAB Cody - MATLAB Central

Problem 42456. Create an array (n,n) where only diagonal elements are '1' and others are '0'

Difficulty:Rate

Solution 11739228

Submitted on 20 Jul 2023 by Shahriar Kabir
This solution is locked. To view this solution, you need to solve the problem first.

Suggested Problems

More from this Author1

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Go to top of page