Problem 1764. singularity 2.0 (really hard)

This problem is the continuation of problem Singularity 2.0 (harder)

If you have been in Cody long enough you have probably run across some badly constructed problems and test suites.

This problem, I believe, represents the worst possible scenario. Yet, it is still possible to solve it. Do you know how?


This is this problem's testsuite:

 x=1/ % oops...

As you may notice, the first line has a syntax error, so the testsuite will break at that point, and will return an error message:

??? 1/ Error: Expression or statement is incomplete or incorrect.

Typical hacks work by overloading some function in the evaluation code (e.g. assert hack). Unfortunately this error happens before the line that calls myfunction, so your function is not even being evaluated. It would seem there is nothing your function can do to avoid this error and pass the problem. Is there?

Solution Stats

28.26% Correct | 71.74% Incorrect
Last solution submitted on Dec 10, 2015

Problem Comments

Solution Comments


Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

MATLAB Academy

New to MATLAB?

Learn MATLAB today!