Cody

Solution 1756866

Submitted on 21 Mar 2019
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; y_correct = sum([2 3 4 5]); assert(isequal(dice_roll_lateral_faces(x),y_correct))

y = [] y = 2 3 4 5

Assertion failed.

2   Fail
x = 2; y_correct = sum([1 3 4 6]); assert(isequal(dice_roll_lateral_faces(x),y_correct))

y = [] y = 1 3 4 6

Assertion failed.

3   Fail
x = 3; y_correct = sum([1 2 5 6]); assert(isequal(dice_roll_lateral_faces(x),y_correct))

y = [] y = 1 2 5 6

Assertion failed.

4   Fail
x = 4; y_correct = sum([1 2 5 6]); assert(isequal(dice_roll_lateral_faces(x),y_correct))

y = [] y = 1 3 5 6

Assertion failed.

5   Fail
x = 5; y_correct = sum([1 3 4 6]); assert(isequal(dice_roll_lateral_faces(x),y_correct))

y = [] y = 2 3 4 6

Assertion failed.

6   Fail
x = 6; y_correct = sum([2 3 4 5]); assert(isequal(dice_roll_lateral_faces(x),y_correct))

y = []

Array indices must be positive integers or logical values. Error in dice_roll_lateral_faces (line 7) z(7-x(i)-1) = []; Error in Test6 (line 3) assert(isequal(dice_roll_lateral_faces(x),y_correct))

7   Fail
x = [1,3]; y_correct = sum([2 3 4 5 1 2 5 6]); assert(isequal(dice_roll_lateral_faces(x),y_correct))

y = [] y = 2 3 4 5 y = 2 3 4 5 1 2 5 6

Assertion failed.

8   Fail
x = [4,4]; y_correct = sum([1 2 5 6 1 2 5 6]); assert(isequal(dice_roll_lateral_faces(x),y_correct))

y = [] y = 1 3 5 6 y = 1 3 5 6 1 3 5 6

Assertion failed.

9   Fail
x = [6,4,3]; y_correct = sum([2 3 4 5 1 2 5 6 1 2 5 6]); assert(isequal(dice_roll_lateral_faces(x),y_correct))

y = []

Array indices must be positive integers or logical values. Error in dice_roll_lateral_faces (line 7) z(7-x(i)-1) = []; Error in Test9 (line 3) assert(isequal(dice_roll_lateral_faces(x),y_correct))

10   Fail
x = [5,5,2]; y_correct = sum([1 3 4 6 1 3 4 6 1 3 4 6]); assert(isequal(dice_roll_lateral_faces(x),y_correct))

y = [] y = 2 3 4 6 y = 2 3 4 6 2 3 4 6 y = 2 3 4 6 2 3 4 6 1 3 4 6

Assertion failed.

11   Fail
x = [3,1,6]; y_correct = sum([1 2 5 6 2 3 4 5 2 3 4 5]); assert(isequal(dice_roll_lateral_faces(x),y_correct))

y = [] y = 1 2 5 6 y = 1 2 5 6 2 3 4 5

Array indices must be positive integers or logical values. Error in dice_roll_lateral_faces (line 7) z(7-x(i)-1) = []; Error in Test11 (line 3) assert(isequal(dice_roll_lateral_faces(x),y_correct))

12   Fail
x = [5,4,3]; y_correct = sum([1 3 4 6 1 2 5 6 1 2 5 6]); assert(isequal(dice_roll_lateral_faces(x),y_correct))

y = [] y = 2 3 4 6 y = 2 3 4 6 1 3 5 6 y = 2 3 4 6 1 3 5 6 1 2 5 6

Assertion failed.

13   Fail
x = [3,1,2,6,1,5]; y_correct = sum([1 2 5 6 2 3 4 5 1 3 4 6 2 3 4 5 2 3 4 5 1 3 4 6]); assert(isequal(dice_roll_lateral_faces(x),y_correct))

y = [] y = 1 2 5 6 y = 1 2 5 6 2 3 4 5 y = 1 2 5 6 2 3 4 5 1 3 4 6

Array indices must be positive integers or logical values. Error in dice_roll_lateral_faces (line 7) z(7-x(i)-1) = []; Error in Test13 (line 3) assert(isequal(dice_roll_lateral_faces(x),y_correct))

Suggested Problems

More from this Author139