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 0Second thing, you must use the GALLERY function :-)
Documentation R2012b to use gallery
Solution Stats
Problem Comments
3 Comments
Solution Comments
Show comments
Loading...
Problem Recent Solvers106
Suggested Problems
-
Extract leading non-zero digit
2246 Solvers
-
Make an awesome ramp for a tiny motorcycle stuntman
750 Solvers
-
Flag largest magnitude swings as they occur
690 Solvers
-
Get the elements of diagonal and antidiagonal for any m-by-n matrix
513 Solvers
-
String Array Basics, Part 1: Convert Cell Array to String Array; No Missing Values
1967 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!
currently 3 different gallery have been used , cool!
4 gallery used at 21-Dec-2012
Thank you for introducing gallery to me. Such a cool function