Cody

Solution 1587280

Submitted on 19 Jul 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
x = 1:10; y_correct = 2:2:20; assert(isequal(f(x),y_correct))

x = 1:10; y_correct = 2:2:20; assert(isequal(f(x),y_correct))

Assertion failed.

2   Fail
x = [0.2400 0.4173 0.0497 0.9027 0.9448 0.4909 0.4893]; y_correct = [1.2400 2.4173 3.0497 4.9027 5.9448 6.4909 7.4893]; assert(isequal(f(x),y_correct))

x = [0.2400 0.4173 0.0497 0.9027 0.9448 0.4909 0.4893]; y_correct = [1.2400 2.4173 3.0497 4.9027 5.9448 6.4909 7.4893]; assert(isequal(f(x),y_correct))

Assertion failed.

3   Fail
x = [4124 52351 pi i -242]; y_correct = [4125 52353 pi+3 4+i -237]; assert(isequal(f(x),y_correct))

x = [4124 52351 pi i -242]; y_correct = [4125 52353 pi+3 4+i -237]; assert(isequal(f(x),y_correct)) [Warning: Colon operands must be real scalars.] [> In f (line 2) In ScoringEngineTestPoint3 (line 3) In solutionTest (line 7) In matlab.unittest.internal.executeCodeBlock (line 11) In matlab.unittest.internal.ScriptTestCaseProvider/evaluateTestSection (line 134) In matlab.unittest.internal.ScriptTestCaseProvider/runTestSection (line 128) In matlab.unittest.internal.ScriptTestCaseProvider>@(testCase)provider.runTestSection(testCase) (line 94) In matlab.unittest.FunctionTestCase/test (line 98) In matlab.unittest.TestRunner/evaluateMethodCore (line 841) In matlab.unittest.TestRunner/evaluateMethod (line 1141) In matlab.unittest.TestRunner/invokeTestContentOperatorMethod_ (line 889) In matlab.unittest.plugins.TestRunnerPlugin/evaluateMethod (line 679) In scoringengine.OutputPlugin/evaluateMethod In matlab.unittest.plugins.TestRunnerPlugin/invokeTestContentOperatorMethod_ (line 710) In matlab.unittest.plugins.TestRunnerPlugin/evaluateMethod (line 679) In scoringengine.FiguresPlugin/evaluateMethod In matlab.unittest.plugins.TestRunnerPlugin/invokeTestContentOperatorMethod_ (line 710) In matlab.unittest.TestRunner/evaluateMethodOnPlugins (line 745) In matlab.unittest.TestRunner/evaluateMethodsOnTestContent (line 783) In matlab.unittest.TestRunner/runTestMethod (line 1137) In matlab.unittest.TestRunner/invokeTestContentOperatorMethod_ (line 889) In matlab.unittest.plugins.TestRunnerPlugin/runTestMethod (line 633) In scoringengine.OutputPlugin/runTestMethod In matlab.unittest.plugins.TestRunnerPlugin/invokeTestContentOperatorMethod_ (line 710) In matlab.unittest.plugins.TestRunnerPlugin/runTestMethod (line 633) In scoringengine.FiguresPlugin/runTestMethod In matlab.unittest.plugins.TestRunnerPlugin/invokeTestContentOperatorMethod_ (line 710) In matlab.unittest.TestRunner/evaluateMethodOnPlugins (line 745) In matlab.unittest.TestRunner/runTest (line 1084) In matlab.unittest.TestRunner/repeatTest (line 471) In matlab.unittest.TestRunner/runSharedTestCase (line 427) In matlab.unittest.TestRunner/runTestClass (line 994) In matlab.unittest.TestRunner/invokeTestContentOperatorMethod_ (line 889) In matlab.unittest.TestRunner/evaluateMethodOnPlugins (line 745) In matlab.unittest.TestRunner/runTestSuite (line 931) In matlab.unittest.TestRunner/invokeTestContentOperatorMethod_ (line 889) In matlab.unittest.plugins.TestRunnerPlugin/runTestSuite (line 250) In scoringengine.OutputPlugin/runTestSuite In matlab.unittest.plugins.TestRunnerPlugin/invokeTestContentOperatorMethod_ (line 710) In matlab.unittest.plugins.TestRunnerPlugin/runTestSuite (line 250) In scoringengine.FiguresPlugin/runTestSuite In matlab.unittest.plugins.TestRunnerPlugin/invokeTestContentOperatorMethod_ (line 710) In matlab.unittest.plugins.TestRunnerPlugin/runTestSuite (line 250) In matlab.unittest.plugins.DiagnosticsRecordingPlugin/runTestSuite (line 184) In matlab.unittest.plugins.TestRunnerPlugin/invokeTestContentOperatorMethod_ (line 710) In matlab.unittest.TestRunner/evaluateMethodOnPlugins (line 745) In matlab.unittest.TestRunner/run (line 295) In scoringengine.verifyCode In scoringengine.verifyCode In connector.internal.fevalMatlab In connector.internal.fevalJSON ]

Assertion failed.

4   Fail
x = [7 4 1 5 8 6 9 2 3]; y_correct = [8 6 4 9 13 12 16 10 12]; assert(isequal(f(x),y_correct))

x = [7 4 1 5 8 6 9 2 3]; y_correct = [8 6 4 9 13 12 16 10 12]; assert(isequal(f(x),y_correct))

Assertion failed.

5   Fail
x = -3:3; y_correct = -2:2:10; assert(isequal(f(x),y_correct))

x = -3:3; y_correct = -2:2:10; assert(isequal(f(x),y_correct))

Assertion failed.

6   Fail
x = 10:-1:1; y_correct = 11*ones(1,10); assert(isequal(f(x),y_correct))

x = 10:-1:1; y_correct = 11*ones(1,10); assert(isequal(f(x),y_correct))

Assertion failed.