Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
A = 4; B = 10;
y_correct = 5;
assert(isequal(fermat(A,B),y_correct))
c =
0×1 empty double column vector
c =
0×1 empty double column vector
c =
5
c =
5
|
2 | Pass |
A = 20; B = 10;
y_correct = [5 10 13 15 17];
assert(isequal(fermat(A,B),y_correct))
c =
0×1 empty double column vector
c =
0×1 empty double column vector
c =
5
c =
5
c =
5
c =
5 10
c =
5 10
c =
5 10
c =
5 10
c =
5 10
c =
5 10
c =
5 10 13 15
c =
5 10 13 15
c =
5 10 13 15
c =
5 10 13 15 17
c =
5 10 13 15 17
c =
5 10 13 15 17
c =
5 10 13 15 17
c =
5 10 13 15 17
c =
5 10 13 15 17
|
3 | Pass |
A = 20; B = 30;
y_correct = [ 5 10 13 15 17 20 25 26 29 30 34];
assert(isequal(fermat(A,B),y_correct))
c =
0×1 empty double column vector
c =
0×1 empty double column vector
c =
5
c =
5
c =
5 13
c =
5 10 13
c =
5 10 13 25
c =
5 10 13 17 25
c =
5 10 13 15 17 25
c =
5 10 13 15 17 25 26
c =
5 10 13 15 17 25 26
c =
5 10 13 15 17 20 25 26
c =
5 10 13 15 17 20 25 26
c =
5 10 13 15 17 20 25 26
c =
5 10 13 15 17 20 25 26
c =
5 10 13 15 17 20 25 26 34
c =
5 10 13 15 17 20 25 26 34
c =
5 10 13 15 17 20 25 26 30 34
c =
5 10 13 15 17 20 25 26 30 34
c =
5 10 13 15 17 20 25 26 29 30 34
|
4 | Pass |
A = 17; B = 33;
y_correct = [5 10 13 15 17 20 25 26 34];
assert(isequal(fermat(A,B),y_correct))
c =
0×1 empty double column vector
c =
0×1 empty double column vector
c =
5
c =
5
c =
5 13
c =
5 10 13
c =
5 10 13 25
c =
5 10 13 17 25
c =
5 10 13 15 17 25
c =
5 10 13 15 17 25 26
c =
5 10 13 15 17 25 26
c =
5 10 13 15 17 20 25 26
c =
5 10 13 15 17 20 25 26
c =
5 10 13 15 17 20 25 26
c =
5 10 13 15 17 20 25 26
c =
5 10 13 15 17 20 25 26 34
c =
5 10 13 15 17 20 25 26 34
|
2240 Solvers
Getting the indices from a vector
3209 Solvers
Return the first and last character of a string
3450 Solvers
Split a string into chunks of specified length
475 Solvers
573 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!