Create a window pattern with h-horizontal bars and v-vertical bars.

For example, for h=4,v=4

    '**********'
    '*  *  *  *'
    '*  *  *  *'
    '**********'
    '*  *  *  *'
    '*  *  *  *'
    '**********'
    '*  *  *  *'
    '*  *  *  *'
    '**********'

The bars should be proportionally placed. Also, the size would increase proportionally to the no of bars.

Check the test suites for clarity.

n.b. for this problem >> no of horizontal & vertical bars are kept equal.

Prev prob https://www.mathworks.com/matlabcentral/cody/problems/45400-fault-in-our-stars-01

Solution Stats

44 Solutions

15 Solvers

Last Solution submitted on Jul 30, 2026

Last 200 Solutions

Problem Comments

Solution Comments

Show comments
Loading...

Problem Recent Solvers15

Suggested Problems

More from this Author174

Community Treasure Hunt

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

Start Hunting!