If you have been in Cody long enough you have probably run across some badly constructed problems and test suites.
This problem represents a particularly difficult scenario. Yet, it is possible to solve it. Do you know how?
Description:
This is this problem's testsuite:
%% y=myfunction(); x=1/[]; % oops... assert(isequal(x,y));
As you may notice, the second line is not a proper division, so the testsuite will break at that point, and will return an error message:
??? Error using mrdivide Matrix dimensions must agree.
Typical hacks work by overloading some function in the evaluation code (e.g. assert hack). Perhaps it is possible to do the same here to avoid this error from happening?
Next problems in this series: Singularity 2.0 (harder); Singularity 2.0 (really hard)
Solution Stats
Problem Comments
Solution Comments
Show commentsProblem Recent Solvers17
Suggested Problems
-
Find the alphabetic word product
3460 Solvers
-
Find the two most distant points
2953 Solvers
-
Project Euler: Problem 8, Find largest product in a large string of numbers
1309 Solvers
-
What is the distance from point P(x,y) to the line Ax + By + C = 0?
560 Solvers
-
439 Solvers
More from this Author33
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!