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 |
x = [1 4 5 7 10 11 13 20 21 23 29];
y_correct = 4;
assert(isequal(fib_count(x),y_correct))
b =
1 4 5 7 10 11 13 20 21 23 29
dem =
0
a =
[]
a =
1
a =
1 2
dem =
1
dem =
2
dem =
3
dem =
4
y =
4
|
2 | Pass |
x = 5:5:100;
y_correct = 2;
assert(isequal(fib_count(x),y_correct))
b =
5 10 15 20 25 30 35 40 45 50 55 60 65 70 75 80 85 90 95 100
dem =
0
a =
[]
a =
1
a =
1 2
dem =
1
dem =
2
y =
2
|
3 | Pass |
%x = [2 2 3 3 3 3 3 3 5 5 6 6 6 7 86168291600238450732788312165664788095941068326060883324529903470149056115823592713458328176574447204501];
% Changed the test suite to a number that can be represented as an integer in DOUBLE
x = [2 2 3 3 3 3 3 3 5 5 6 6 6 7 8944394323791465];
y_correct = 3;
assert(isequal(fib_count(x),y_correct))
b =
1.0e+15 *
0.0000 0.0000 0.0000 0.0000 0.0000 8.9444
dem =
0
a =
[]
a =
1
a =
1 2
dem =
1
dem =
2
dem =
3
y =
3
|
4 | Pass |
x = [2 2 3 3 3 3 3 3 5 5 6 6 6 7 8944394323791464];
y_correct = 4;
assert(isequal(fib_count(x),y_correct))
b =
1.0e+15 *
0.0000 0.0000 0.0000 0.0000 0.0000 8.9444
dem =
0
a =
[]
a =
1
a =
1 2
dem =
1
dem =
2
dem =
3
dem =
4
y =
4
|
2401 Solvers
Similar Triangles - find the height of the tree
203 Solvers
Find nearest prime number less than input number
268 Solvers
The sum of the numbers in the vector
426 Solvers
992 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!