Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
a = [ 1 2 3
0 4 5
6 0 0 ];
b_correct = [ 0 0 0
1 2 3
6 4 5 ];
assert(isequal(bubbles(a),b_correct))
z =
3×1 logical array
0
1
0
z =
3×1 logical array
0
0
1
z =
3×1 logical array
0
0
1
|
2 | Pass |
a = [ 1 0 5 0 7 0 6 ]';
b_correct = [ 0 0 0 1 5 7 6 ]';
assert(isequal(bubbles(a),b_correct))
z =
7×1 logical array
0
1
0
1
0
1
0
|
3 | Pass |
a = [1 0; 1 1];
b_correct = [1 0; 1 1];
assert(isequal(bubbles(a),b_correct))
z =
2×1 logical array
0
0
z =
2×1 logical array
1
0
|
4 | Pass |
a = [0 8 0 6 -2]';
b_correct = [0 0 8 6 -2]';
assert(isequal(bubbles(a),b_correct))
z =
5×1 logical array
1
0
1
0
0
|
2980 Solvers
620 Solvers
277 Solvers
3070 Solvers
321 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!