Problem 18 asks to create a bullseye matrix like this:
[ 3 3 3 3 3 3 2 2 2 3 3 2 1 2 3 3 2 2 2 3 3 3 3 3 3 ]
But I think a better one would look like this:
[ 5 4 3 4 5 4 3 2 3 4 3 2 1 2 3 4 3 2 3 4 5 4 3 4 5 ]
Thus given n (always odd), return output a that has concentric rings of the numbers 1 through n around the center point.
Solution Stats
Problem Comments
1 Comment
Solution Comments
Show comments
Loading...
Problem Recent Solvers248
Suggested Problems
-
Find the sum of all the numbers of the input vector
53758 Solvers
-
Get the area codes from a list of phone numbers
1072 Solvers
-
364 Solvers
-
Number of 1s in a binary string
10965 Solvers
-
Celsius to Fahrenheit converter
665 Solvers
More from this Author39
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
Its a good problem. Got me back to solving problems at Cody after about 2 months!