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

488 Solutions

114 Solvers

Last Solution submitted on Apr 03, 2026

Last 200 Solutions

Problem Comments

Solution Comments

Show comments
Loading...

Group


Problem Recent Solvers114

Problem Tags

Community Treasure Hunt

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

Start Hunting!