Test | Status | Code Input and Output |
---|---|---|
1 | Fail |
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 | Fail |
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 | Fail |
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
|
9839 Solvers
698 Solvers
Split a string into chunks of specified length
475 Solvers
convert matrix to single column
306 Solvers
260 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!