generate the matrix - MATLAB Cody - MATLAB Central

Problem 45235. generate the matrix

given 3 inputs e.g [2,3,4] -- generate a matrix like below -- [2 2 0 0 0 0 0 0 0; 2 2 0 0 0 0 0 0 0; 0 0 3 3 3 0 0 0 0; 0 0 3 3 3 0 0 0 0; 0 0 3 3 3 0 0 0 0; 0 0 0 0 0 4 4 4 4; 0 0 0 0 0 4 4 4 4; 0 0 0 0 0 4 4 4 4; 0 0 0 0 0 4 4 4 4]

check the test suites to be clear.

Solution Stats

53.13% Correct | 46.88% Incorrect
Last Solution submitted on Jun 14, 2025

Problem Comments

Solution Comments

Show comments

Problem Recent Solvers32

Suggested Problems

More from this Author174

Problem Tags

Community Treasure Hunt

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

Start Hunting!