Cody

# Problem 45370. Sky full of stars - 03

Solution 3571365

Submitted on 6 Nov 2020
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

### Test Suite

Test Status Code Input and Output
1   Fail
a=[ '************' '***** *****' '**** ****' '*** ***' '** **' '* *' '* *' '** **' '*** ***' '**** ****' '***** *****' '************']; assert(isequal(star_pattern_3(6),a))

y = 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 y = 11×12 char array '************' '***** *****' '**** ****' '*** ***' '** **' '* *' '** **' '*** ***' '**** ****' '***** *****' '************'

Assertion failed.

2   Fail
a=[ '******' '** **' '* *' '* *' '** **' '******']; assert(isequal(star_pattern_3(3),a))

y = 0 0 0 0 0 0 0 0 0 y = 5×6 char array '******' '** **' '* *' '** **' '******'

Assertion failed.

3   Fail
a=[ '****' '* *' '* *' '****']; assert(isequal(star_pattern_3(2),a))

y = 0 0 0 0 y = 3×4 char array '****' '* *' '****'

Assertion failed.

4   Fail
a=[ '********************' '********* *********' '******** ********' '******* *******' '****** ******' '***** *****' '**** ****' '*** ***' '** **' '* *' '* *' '** **' '*** ***' '**** ****' '***** *****' '****** ******' '******* *******' '******** ********' '********* *********' '********************']; assert(isequal(star_pattern_3(10),a))

y = 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 y = 19×20 char array '********************' '********* *********' '******** ********' '******* *******' '****** ******' '***** *****' '**** ****' '*** ***' '** **' '* *' '** **' '*** ***' '**** ****' '***** *****' '****** ******' '******* *******' '******** ********' '********* *********' '********************'

Assertion failed.

### Community Treasure Hunt

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

Start Hunting!