Problem 1121. Make a logical diamond using GALLERY function
Inspired from Problem 1078. Make a diamond
In this problem the output will be a logical matrix The input n is still odd. For example if n = 5 you will get the logical matrix :
m =
0 0 1 0 0 0 1 0 1 0 1 0 0 0 1 0 1 0 1 0 0 0 1 0 0
Second thing, you must use the GALLERY function :-)
Documentation R2012b to use gallery
Solution Stats
Problem Comments
-
3 Comments
Aurelien Queffurust
on 14 Dec 2012
currently 3 different gallery have been used , cool!
Aurelien Queffurust
on 21 Dec 2012
4 gallery used at 21-Dec-2012
shahriar memaran
on 3 Apr 2017
Thank you for introducing gallery to me. Such a cool function
Solution Comments
Show commentsProblem Recent Solvers95
Suggested Problems
-
2246 Solvers
-
Number of 1s in a binary string
9096 Solvers
-
Right Triangle Side Lengths (Inspired by Project Euler Problem 39)
1788 Solvers
-
convert matrix to single column
408 Solvers
-
Decimation - Optimized for speed
170 Solvers
More from this Author30
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!