Cody

Solution 1686386

Submitted on 4 Dec 2018 by HH
  • Size: 9
  • This is the leading solution.
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   Pass
x=[1 2]; y=1; y_correct=[1 2]; assert(isequal(muldif(x,y),y_correct));

[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In muldif (line 2) In ScoringEngineTestPoint1 (line 4) In solutionTest (line 3)]

2   Pass
x=1; y=1; y_correct=1; assert(isequal(muldif(x,y),y_correct));

[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In muldif (line 2) In ScoringEngineTestPoint2 (line 4) In solutionTest (line 5)]

3   Pass
x=[1 2 0 1]; y=[8 5 1]; y_correct = [8 21 11 10 5 1]; assert(isequal(muldif(x,y),y_correct))

[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In muldif (line 2) In ScoringEngineTestPoint3 (line 4) In solutionTest (line 7)]

4   Pass
x=[1 2 3 4 4 1 2 1 1 1]; y=[1 2 3 4 5 6 9 10]; y_correct=[1 4 10 20 34 49 68 90 104 109 101 73 43 40 25 19 10]; assert(isequal(muldif(x,y),y_correct));

[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In muldif (line 2) In ScoringEngineTestPoint4 (line 4) In solutionTest (line 9)]

5   Pass
x=[1:10 0 1]; y=[8 5:1:25 1]; y_correct = [8 21 40 66 100 143 196 260 336 425 440 503 555 611 667 723 779 835 891 947 1003 1059 1090 1094 1070 1017 934 820 674 495 282 34 25 1 ]; assert(isequal(muldif(x,y),y_correct))

[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In muldif (line 2) In ScoringEngineTestPoint5 (line 5) In solutionTest (line 11)]

Suggested Problems

More from this Author21