Problem 54159. Draw "C" in a zero matrix
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
Problem Comments
-
1 Comment
Rafael S.T. Vieira
on 5 Nov 2022
Please, include what should be done when x < 5 in the problem's description.
Solution Comments
Show commentsProblem Recent Solvers27
Suggested Problems
-
Arrange Vector in descending order
10504 Solvers
-
296 Solvers
-
Find Out sum of principal diagonal element of given matrix
242 Solvers
-
Check that number is whole number
3946 Solvers
-
calculate the length of matrix
1507 Solvers
More from this Author1
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!