This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.
Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
n = 6;
out = 8;
assert(isequal(next_fibonacci(n),out));
[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 next_fibonacci (line 2)
In ScoringEngineTestPoint1 (line 3)
In solutionTest (line 3)]
|
2 | Pass |
n = [12 40 50];
out = [13 55 55];
assert(isequal(next_fibonacci(n),out));
[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 next_fibonacci (line 2)
In ScoringEngineTestPoint2 (line 3)
In solutionTest (line 5)]
|
3 | Pass |
n = 10.^(1:5);
out = [13 144 1597 10946 121393];
assert(isequal(next_fibonacci(n),out));
[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 next_fibonacci (line 2)
In ScoringEngineTestPoint3 (line 3)
In solutionTest (line 7)]
|
4 | Pass |
n = round(7.^(3:.5:7));
out = [377 987 2584 6765 17711 46368 121393 317811 832040];
assert(isequal(next_fibonacci(n),out));
[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 next_fibonacci (line 2)
In ScoringEngineTestPoint4 (line 3)
In solutionTest (line 9)]
|
9866 Solvers
9831 Solvers
1882 Solvers
546 Solvers
Cell Counting: How Many Draws?
581 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!