Write a function that takes N as the input, and outputs a matrix whose upper-left (NxN) quadrant contains all ones, the lower-right (NxN) quadrant contains all N's, and zeros everywhere else. For example, if N = 3:

Solution Stats

1625 Solutions

866 Solvers

Last Solution submitted on Mar 18, 2026

Last 200 Solutions

Problem Comments

Solution Comments

Show comments
Loading...

Problem Recent Solvers866

Suggested Problems

More from this Author10

Community Treasure Hunt

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

Start Hunting!