Draw 'Y' in an x-by-x matrix (where x is odd and x >= 3)
Examples:
x = 3
y = [1 0 1
0 1 0
0 1 0]
x = 5
y = [1 0 0 0 1
0 1 0 1 0
0 0 1 0 0
0 0 1 0 0
0 0 1 0 0]
Solution Stats
Problem Comments
1 Comment
Solution Comments
Show comments
Loading...
Problem Recent Solvers41
Suggested Problems
-
Find the longest sequence of 1's in a binary sequence.
6802 Solvers
-
393 Solvers
-
Given a matrix, swap the 2nd & 3rd columns
1270 Solvers
-
1738 Solvers
-
Find the next Fibonacci number
921 Solvers
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
Collecting all the letters