Problem 2456. remove single elements
Solution Stats
Problem Comments
-
4 Comments
Since matlab has so many different ways of representing the empty set, could you test for emptiness using isempty(...) rather than isequal([], ...) ?
Test suit # 4 should not compare out = [] with output of the function but rather isempty(out) !!!
Two requests:
1. Please don't add intentional infinite loops to the test suite.
2. Please take more care when scanning for forbidden keywords. "x(grouptransform(x', x', @numel) > 1)" would be a perfectly good solution, but fails the test suite because "grouptransform" contains the letters "for".
Thanks.
Test suite has been updated -
The infinite loop has been cleared out, scanning for 'for' loop has been modified and empty sets will now be verified using isempty().
Solution Comments
Show commentsProblem Recent Solvers106
Suggested Problems
-
Make the vector [1 2 3 4 5 6 7 8 9 10]
49317 Solvers
-
1211 Solvers
-
Determine Whether an array is empty
775 Solvers
-
Split a string into chunks of specified length
1713 Solvers
-
Change the sign of even index entries of the reversed vector
553 Solvers
More from this Author44
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!