Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
x = 5;
y_correct = ...
[1 1 1 1 1
1 0 0 0 0
1 1 1 1 1
1 0 0 0 0
1 0 0 0 0];
assert(isequal(your_fcn_name(x),y_correct))
|
2 | Pass |
x = 7;
y_correct = ...
[1 1 1 1 1 1 1
1 0 0 0 0 0 0
1 0 0 0 0 0 0
1 1 1 1 1 1 1
1 0 0 0 0 0 0
1 0 0 0 0 0 0
1 0 0 0 0 0 0]
assert(isequal(your_fcn_name(x),y_correct))
y_correct =
1 1 1 1 1 1 1
1 0 0 0 0 0 0
1 0 0 0 0 0 0
1 1 1 1 1 1 1
1 0 0 0 0 0 0
1 0 0 0 0 0 0
1 0 0 0 0 0 0
|
3 | Pass |
x = 11;
y_correct = ...
[1 1 1 1 1 1 1 1 1 1 1
1 0 0 0 0 0 0 0 0 0 0
1 0 0 0 0 0 0 0 0 0 0
1 0 0 0 0 0 0 0 0 0 0
1 0 0 0 0 0 0 0 0 0 0
1 1 1 1 1 1 1 1 1 1 1
1 0 0 0 0 0 0 0 0 0 0
1 0 0 0 0 0 0 0 0 0 0
1 0 0 0 0 0 0 0 0 0 0
1 0 0 0 0 0 0 0 0 0 0
1 0 0 0 0 0 0 0 0 0 0]
assert(isequal(your_fcn_name(x),y_correct))
y_correct =
1 1 1 1 1 1 1 1 1 1 1
1 0 0 0 0 0 0 0 0 0 0
1 0 0 0 0 0 0 0 0 0 0
1 0 0 0 0 0 0 0 0 0 0
1 0 0 0 0 0 0 0 0 0 0
1 1 1 1 1 1 1 1 1 1 1
1 0 0 0 0 0 0 0 0 0 0
1 0 0 0 0 0 0 0 0 0 0
1 0 0 0 0 0 0 0 0 0 0
1 0 0 0 0 0 0 0 0 0 0
1 0 0 0 0 0 0 0 0 0 0
|
Find relatively common elements in matrix rows
865 Solvers
1261 Solvers
3892 Solvers
404 Solvers
903 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!