Matrix Quadrants - MATLAB Cody - MATLAB Central

Problem 55220. Matrix Quadrants

Difficulty:Rate
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

59.46% Correct | 40.54% Incorrect
Last Solution submitted on Mar 16, 2025

Problem Comments

Solution Comments

Show comments

Problem Recent Solvers665

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!
Go to top of page