Problem 1078. Make a diamond

Given n, odd number > 1, return n by n matrix consist of "null" and "*" characters arranged like a diamond.

No toolbox functions please.

n = 3

m =

 *
* *
 *

n = 7

m =

   *   
  * *  
 *   *  
*     *
 *   *  
  * *
   *

Solution Stats

30.09% Correct | 69.91% Incorrect
Last Solution submitted on Aug 23, 2024

Problem Comments

Solution Comments

Show comments

Problem Recent Solvers82

Suggested Problems

More from this Author1

Problem Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!