Problem 50877. Draw a '2' in a zero matrix!
Given an x-by-x matrix filled with zeros (x is odd and > 3). Use 2s to draw the number 2 into it! Like this:
x = 5, y =
2 2 2 2 2
0 0 0 0 2
2 2 2 2 2
2 0 0 0 0
2 2 2 2 2
x = 7, y =
2 2 2 2 2 2 2
0 0 0 0 0 0 2
0 0 0 0 0 0 2
2 2 2 2 2 2 2
2 0 0 0 0 0 0
2 0 0 0 0 0 0
2 2 2 2 2 2 2
Solution Stats
Problem Comments
Solution Comments
Show commentsGroup

Draw numbers!
- 10 Problems
- 411 Finishers
- Draw a '1' in a zero matrix!
- Find x rows where the sum of the numbers is the maximum
- Draw a '5' in a zero matrix!
- Draw a '2' in a zero matrix!
- Draw a '3' in a zero matrix!
- Draw a '8' in a zero matrix!
- Draw a '7' in a zero matrix!
- Draw a '9' in a zero matrix!
- Draw a '6' in a zero matrix!
- Draw a '4' in a zero matrix!
Problem Recent Solvers482
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!