Really like your generic approach to solving this problem. In my case, I was misled by the test suite to provide a solution that works only for integral values.
1056 Solvers
407 Solvers
711 Solvers
Make a random, non-repeating vector.
3015 Solvers
Create a random logical vector of N elements of which M are true.
85 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!