Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
x = [1 2 3 4 5 6 7];
xi = split_it(x);
assert(isequal(sum(x(xi)),sum(x)/2));
|
2 | Pass |
x = [2 2 2 2 2 2];
xi = split_it(x);
assert(isequal(sum(x(xi)),sum(x)/2));
|
3 | Pass |
x = [2 5 4 5 4];
xi = split_it(x);
assert(isequal(sum(x(xi)),sum(x)/2));
|
4 | Pass |
x = [1 3 1 1 9 7];
xi = split_it(x);
assert(isequal(sum(x(xi)),sum(x)/2));
|
5 | Pass |
x = primes(100);
xi = split_it(x);
assert(isequal(sum(x(xi)),sum(x)/2));
|
Return the largest number that is adjacent to a zero
3750 Solvers
261 Solvers
Getting the row and column location from a matrix
236 Solvers
Vectorize the digits of an Integer
269 Solvers
How many trades represent all the profit?
520 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!