Need a better test suite to prevent cheesy solutions like this one. :-) Some N>10 values in there would help. N>50 would be even better.
Find a subset that divides the vector into equal halves
338 Solvers
435 Solvers
2548 Solvers
62 Solvers
372 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!