Draw "C" in a zero matrix - MATLAB Cody - MATLAB Central

Problem 54159. Draw "C" in a zero matrix

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

Solution Stats

48.33% Correct | 51.67% Incorrect
Last Solution submitted on Aug 01, 2024

Problem Comments

Solution Comments

Show comments

Problem Recent Solvers28

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