Given a x-by-x matrix filled with zeros (x is odd and > 3). Use 5s to draw a number 5 into it! Like this:
x = 5, y =
5 5 5 5 5
5 0 0 0 0
5 5 5 5 5
0 0 0 0 5
5 5 5 5 5
x = 7, y =
5 5 5 5 5 5 5
5 0 0 0 0 0 0
5 0 0 0 0 0 0
5 5 5 5 5 5 5
0 0 0 0 0 0 5
0 0 0 0 0 0 5
5 5 5 5 5 5 5
Solution Stats
Problem Comments
1 Comment
Solution Comments
Show comments
Loading...
Problem Recent Solvers648
Suggested Problems
-
2524 Solvers
-
Project Euler: Problem 2, Sum of even Fibonacci
2830 Solvers
-
Convert a numerical matrix into a cell array of strings
2384 Solvers
-
Sum the numbers on the main diagonal
613 Solvers
-
Return fibonacci sequence do not use loop and condition
854 Solvers
More from this Author12
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
There is a very interesting solution that is create 7 segement on your array like a "7-segment Display"
https: //www.electronics-tutorials.ws/blog/7-segment-display-tutorial.html
This way may seem more complicated but once you has the data of segement coordinate on your matrix you can automate other solution in this group easily.
So i can call it is a master solution