-
2 Comments
There is a problem with the tests. Particularly with Test 20.
My solution kept failing the test until I changed the output to "False" always. At that point the solution passed.
Any feedback / suggestions would be appreciated.
@Lev: the line "combo=combo+1;" means that in some cases, the output can be > 1. All the other test cases just force-converted to logical so any nonzero numeric return will be T and 0 will be F. Test 20, however, actually checks against another logical, so the numerical return (>1) fails. The problem states that the function should return logical T/F, so there should probably be a test specifically for that.
Suggested Problems
-
2543 Solvers
-
The Goldbach Conjecture, Part 2
2367 Solvers
-
3031 Solvers
-
2388 Solvers
-
1516 Solvers
More from this Author10
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!