Problem 43801. Union Jack Matrix
Create a matrix of odd dimensions that has ones on both diagonals and dividing the matrix into 4 quadrants, resembling a square union jack flag. For example, if n=11:
1 0 0 0 0 1 0 0 0 0 1 0 1 0 0 0 1 0 0 0 1 0 0 0 1 0 0 1 0 0 1 0 0 0 0 0 1 0 1 0 1 0 0 0 0 0 0 0 1 1 1 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 1 1 1 0 0 0 0 0 0 0 1 0 1 0 1 0 0 0 0 0 1 0 0 1 0 0 1 0 0 0 1 0 0 0 1 0 0 0 1 0 1 0 0 0 0 1 0 0 0 0 1
Solution Stats
Problem Comments
-
1 Comment
Jihye Sofia Seo
on 14 Feb 2017
I wanted to design a problem like this. Very neat!
Solution Comments
Show commentsGroup

Computer Games III
- 13 Problems
- 2 Finishers
- Sokoban: Puzzle 10.45
- Toads and Frogs Puzzle
- Toads and Frogs Puzzle 2
- Win all the time!
- PACMAT 06 - Optimized Ghosts, Equal Speed, Inf Lives; Interactive Download
- PACMAT 07 - Optimized Ghosts, PAC 2X Ghost Speed, 4 Lives; Interactive Download
- PACMAT 08 - Awesome Tunneling Ghosts, 2X Speed, 6 Lives, Game Download
- PACMAT 09 - Awesome Tunnelling Ghosts, Equal Speed, 20 Lives, Game Download
- Capture the flag(s)
- BLOCK x3 (Version 1)
- BLOCK x3 (Version 2)
- BLOCK x3 (Version 3)
- BLOCK x3 (Version 4)
Problem Recent Solvers82
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!