Problem 1927. Find nth maximum
Solution Stats
Problem Comments
-
4 Comments
I think the test cases are not correct. Can you check this?
The test cases expect isequal(NaN,NaN) to return true. This is wrong.
please use the function "isquealn" http://www.mathworks.de/de/help/matlab/ref/isequaln.html
I went ahead and made the test suite change that José suggested above.
Solution Comments
-
2 Comments
Clever! If the system doesn't work properly, work around it.
Thanks :) in retrospect I probably should have overloaded isequal with isequalwithequalnans instead, but I guess this makes a similar point... (and if you are interested, the whole 'singularity' series of problems is devoted to "work arounds" for this sort of ill-defined testsuites)
Problem Recent Solvers558
Suggested Problems
-
Sort a list of complex numbers based on far they are from the origin.
4859 Solvers
-
It dseon't mettar waht oedrr the lrettes in a wrod are.
1030 Solvers
-
1412 Solvers
-
Generate N equally spaced intervals between -L and L
710 Solvers
-
Right Triangle Side Lengths (Inspired by Project Euler Problem 39)
1103 Solvers
More from this Author2
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!