Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
x = 7;
y_correct = 17/11;
assert(isequal(your_fcn_name(x),y_correct))
v =
1 2 3 4 5 6 7
ans =
1 4 6
|
2 | Fail |
x = 8;
y_correct = 17/11;
assert(isequal(your_fcn_name(x),y_correct))
v =
1 2 3 4 5 6 7 8
ans =
1 4 6 8
|
3 | Fail |
x = 9;
y_correct = 17/11;
assert(isequal(your_fcn_name(x),y_correct))
v =
1 2 3 4 5 6 7 8 9
ans =
1 4 6 8 9
|
4 | Fail |
x = 12;
y_correct = 28/38;
assert(isequal(your_fcn_name(x),y_correct))
v =
1 2 3 4 5 6 7 8 9 10 11 12
ans =
1 4 6 8 9 10 12
|
5 | Fail |
x = 20;
y_correct = 77/113;
assert(isequal(your_fcn_name(x),y_correct))
v =
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
ans =
1 4 6 8 9 10 12 14 15 16 18 20
|
6 | Pass |
x = 31;
y_correct = 160/336;
assert(isequal(your_fcn_name(x),y_correct))
v =
Columns 1 through 30
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
Column 31
31
ans =
1 4 6 8 9 10 12 14 15 16 18 20 21 22 24 25 26 27 28 30
|
7 | Fail |
x = 32;
y_correct = 160/336;
assert(isequal(your_fcn_name(x),y_correct))
v =
Columns 1 through 30
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
Columns 31 through 32
31 32
ans =
1 4 6 8 9 10 12 14 15 16 18 20 21 22 24 25 26 27 28 30 32
|
8 | Fail |
x = 42;
y_correct = 238/623;
assert(isequal(your_fcn_name(x),y_correct))
v =
Columns 1 through 30
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
Columns 31 through 42
31 32 33 34 35 36 37 38 39 40 41 42
ans =
1 4 6 8 9 10 12 14 15 16 18 20 21 22 24 25 26 27 28 30 32 33 34 35 36 38 39 40 42
|
Return the 3n+1 sequence for n
6168 Solvers
450 Solvers
2981 Solvers
Sum the 'edge' values of a matrix
232 Solvers
139 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!