Cody

# Problem 1769. singularity 2.0 (easier)

Solution 1427943

Submitted on 29 Jan 2018
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

### Test Suite

Test Status Code Input and Output
1   Fail
y=myfunction(); x=1/[]; % oops...; assert(isequal(x,y))

fid = 3 l = 0×0 empty char array k = 1 r = 1×1 cell array {0×0 char} l = '%%' r = 1×2 cell array {0×0 char} {'%%'} l = 'ScoringEngineTestPoint1' r = 1×3 cell array {0×0 char} {'%%'} {'ScoringEngineTestPoint1'} l = -1 ans = '/users/mss.system.qWoN7r' . ScoringEngineTestPoint1.m solutionTest.m .. file.m submission . ScoringEngineTestPoint1.m myfolder submission .. file.m solutionTest.m . ScoringEngineTestPoint1.m myfolder submission .. file.m solutionTest.m . .. mss.system.qWoN7r ans = struct with fields: file: 'myfunction.m' name: 'myfunction' line: 24 ans = struct with fields: file: 'ScoringEngineTestPoint1.m' name: 'ScoringEngineTestPoint1' line: 1 ans = struct with fields: file: 'solutionTest.m' name: 'solutionTest' line: 3 ans = struct with fields: file: 'executeCodeBlock.m' name: 'executeCodeBlock' line: 11 ans = struct with fields: file: 'ScriptTestCaseProvider.m' name: 'ScriptTestCaseProvider.evaluateTestSection' line: 132 ans = struct with fields: file: 'ScriptTestCaseProvider.m' name: 'ScriptTestCaseProvider.runTestSection' line: 127 ans = struct with fields: file: 'ScriptTestCaseProvider.m' name: '@(testCase)provider.runTestSection(testCase)' line: 94 ans = struct with fields: file: 'FunctionTestCase.m' name: 'FunctionTestCase.test' line: 98 ans = struct with fields: file: 'TestRunner.m' name: 'TestRunner.evaluateMethodCore' line: 790 ans = struct with fields: file: 'TestRunner.m' name: 'TestRunner.evaluateMethod' line: 1065 ans = struct with fields: file: 'TestRunner.m' name: 'TestRunner.invokeTestContentOperatorMethod_' line: 838 ans = struct with fields: file: 'TestRunnerPlugin.m' name: 'TestRunnerPlugin.evaluateMethod' line: 679 ans = struct with fields: file: 'OutputPlugin.p' name: 'OutputPlugin.evaluateMethod' line: 0 ans = struct with fields: file: 'TestRunnerPlugin.m' name: 'TestRunnerPlugin.invokeTestContentOperatorMethod_' line: 696 ans = struct with fields: file: 'TestRunnerPlugin.m' name: 'TestRunnerPlugin.evaluateMethod' line: 679 ans = struct with fields: file: 'FiguresPlugin.p' name: 'FiguresPlugin.evaluateMethod' line: 0 ans = struct with fields: file: 'TestRunnerPlugin.m' name: 'TestRunnerPlugin.invokeTestContentOperatorMethod_' line: 696 ans = struct with fields: file: 'TestRunner.m' name: 'TestRunner.evaluateMethodOnPlugins' line: 696 ans = struct with fields: file: 'TestRunner.m' name: 'TestRunner.evaluateMethodsOnTestContent' line: 734 ans = struct with fields: file: 'TestRunner.m' name: 'TestRunner.runTestMethod' line: 1061 ans = struct with fields: file: 'TestRunner.m' name: 'TestRunner.invokeTestContentOperatorMethod_' line: 838 ans = struct with fields: file: 'TestRunnerPlugin.m' name: 'TestRunnerPlugin.runTestMethod' line: 633 ans = struct with fields: file: 'OutputPlugin.p' name: 'OutputPlugin.runTestMethod' line: 0 ans = struct with fields: file: 'TestRunnerPlugin.m' name: 'TestRunnerPlugin.invokeTestContentOperatorMethod_' line: 696 ans = struct with fields: file: 'TestRunnerPlugin.m' name: 'TestRunnerPlugin.runTestMethod' line: 633 ans = struct with fields: file: 'FiguresPlugin.p' name: 'FiguresPlugin.runTestMethod' line: 0 ans = struct with fields: file: 'TestRunnerPlugin.m' name: 'TestRunnerPlugin.invokeTestContentOperatorMethod_' line: 696 ans = struct with fields: file: 'TestRunner.m' name: 'TestRunner.evaluateMethodOnPlugins' line: 696 ans = struct with fields: file: 'TestRunner.m' name: 'TestRunner.runTest' line: 1012 ans = struct with fields: file: 'TestRunner.m' name: 'TestRunner.repeatTest' line: 441 ans = struct with fields: file: 'TestRunner.m' name: 'TestRunner.runSharedTestCase' line: 416 ans = struct with fields: file: 'TestRunner.m' name: 'TestRunner.runTestClass' line: 943 ans = struct with fields: file: 'TestRunner.m' name: 'TestRunner.invokeTestContentOperatorMethod_' line: 838 ans = struct with fields: file: 'TestRunner.m' name: 'TestRunner.evaluateMethodOnPlugins' line: 696 ans = struct with fields: file: 'TestRunner.m' name: 'TestRunner.runTestSuite' line: 880 ans = struct with fields: file: 'TestRunner.m' name: 'TestRunner.invokeTestContentOperatorMethod_' line: 838 ans = struct with fields: file: 'TestRunnerPlugin.m' name: 'TestRunnerPlugin.runTestSuite' line: 250 ans = struct with fields: file: 'OutputPlugin.p' name: 'OutputPlugin.runTestSuite' line: 0 ans = struct with fields: file: 'TestRunnerPlugin.m' name: 'TestRunnerPlugin.invokeTestContentOperatorMethod_' line: 696 ans = struct with fields: file: 'TestRunnerPlugin.m' name: 'TestRunnerPlugin.runTestSuite' line: 250 ans = struct with fields: file: 'FiguresPlugin.p' name: 'FiguresPlugin.runTestSuite' line: 0 ans = struct with fields: file: 'TestRunnerPlugin.m' name: 'TestRunnerPlugin.invokeTestContentOperatorMethod_' line: 696 ans = struct with fields: file: 'TestRunnerPlugin.m' name: 'TestRunnerPlugin.runTestSuite' line: 250 ans = struct with fields: file: 'DiagnosticsRecordingPlugin.m' name: 'DiagnosticsRecordingPlugin.runTestSuite' line: 184 ans = struct with fields: file: 'TestRunnerPlugin.m' name: 'TestRunnerPlugin.invokeTestContentOperatorMethod_' line: 696 ans = struct with fields: file: 'TestRunner.m' name: 'TestRunner.evaluateMethodOnPlugins' line: 696 ans = struct with fields: file: 'TestRunner.m' name: 'TestRunner.run' line: 288 ans = struct with fields: file: 'verifyCode.p' name: 'verifyCode' line: 0 ans = struct with fields: file: 'verifyCode.p' name: 'verifyCode' line: 0 ans = struct with fields: file: 'fevalMatlab.p' name: 'fevalMatlab' line: 0 ans = struct with fields: file: 'fevalJSON.p' name: 'fevalJSON' line: 0

Index exceeds matrix dimensions. Error in myfunction (line 26) y(j) Error in Test1 (line 1) y=myfunction();