Problem 1769. singularity 2.0 (easier)

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?


This is this problem's testsuite:

 x=1/[]; % oops...

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

14.89% Correct | 85.11% Incorrect
Last solution submitted on Jan 24, 2019

Problem Comments

Recent Solvers13

Suggested Problems

More from this Author38


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!