Draw "T" inside a Zero Matrix - MATLAB Cody - MATLAB Central

Problem 54164. Draw "T" inside a Zero Matrix

Difficulty:Rate
Given a x-by-x matrix filled with zeros (x> 2). Use 1 to draw a letter "T" into it! Like this:
x = 5, y =
1 1 1 1 1
0 0 1 0 0
0 0 1 0 0
0 0 1 0 0
0 0 1 0 0
x = 6, y =
1 1 1 1 1 1
1 1 1 1 1 1
0 0 1 1 0 0
0 0 1 1 0 0
0 0 1 1 0 0
0 0 1 1 0 0

Solution Stats

46.67% Correct | 53.33% Incorrect
Last Solution submitted on Feb 22, 2025

Problem Comments

Solution Comments

Show comments

Problem Recent Solvers32

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