This solution is outdated. To rescore this solution, sign in.
Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
x = 5;
y_correct = ...
[1 1 1 1 0
1 0 0 0 1
1 1 1 1 0
1 0 0 0 1
1 1 1 1 0];
assert(isequal(your_fcn_name(x),y_correct))
|
2 | Pass |
x = 7;
y_correct = ...
[1 1 1 1 1 1 0
1 0 0 0 0 0 1
1 0 0 0 0 0 1
1 1 1 1 1 1 0
1 0 0 0 0 0 1
1 0 0 0 0 0 1
1 1 1 1 1 1 0]
assert(isequal(your_fcn_name(x),y_correct))
y_correct =
1 1 1 1 1 1 0
1 0 0 0 0 0 1
1 0 0 0 0 0 1
1 1 1 1 1 1 0
1 0 0 0 0 0 1
1 0 0 0 0 0 1
1 1 1 1 1 1 0
|
3 | Pass |
x = 11;
y_correct = ...
[1 1 1 1 1 1 1 1 1 1 0
1 0 0 0 0 0 0 0 0 0 1
1 0 0 0 0 0 0 0 0 0 1
1 0 0 0 0 0 0 0 0 0 1
1 0 0 0 0 0 0 0 0 0 1
1 1 1 1 1 1 1 1 1 1 0
1 0 0 0 0 0 0 0 0 0 1
1 0 0 0 0 0 0 0 0 0 1
1 0 0 0 0 0 0 0 0 0 1
1 0 0 0 0 0 0 0 0 0 1
1 1 1 1 1 1 1 1 1 1 0]
assert(isequal(your_fcn_name(x),y_correct))
y_correct =
1 1 1 1 1 1 1 1 1 1 0
1 0 0 0 0 0 0 0 0 0 1
1 0 0 0 0 0 0 0 0 0 1
1 0 0 0 0 0 0 0 0 0 1
1 0 0 0 0 0 0 0 0 0 1
1 1 1 1 1 1 1 1 1 1 0
1 0 0 0 0 0 0 0 0 0 1
1 0 0 0 0 0 0 0 0 0 1
1 0 0 0 0 0 0 0 0 0 1
1 0 0 0 0 0 0 0 0 0 1
1 1 1 1 1 1 1 1 1 1 0
|
1051 Solvers
483 Solvers
387 Solvers
369 Solvers
String Array Basics, Part 1: Convert Cell Array to String Array; No Missing Values
358 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!