Cody

# Problem 434. Return the Fibonacci Sequence

Solution 1903190

Submitted on 17 Aug 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 = fib_seq(34); assert(isequal(X(end),21) && length(X)==8)

i = 1 y = 1

Index exceeds the number of array elements (1). Error in fib_seq (line 5) y(i+1) = i+ y(i+2) Error in Test1 (line 1) X = fib_seq(34);

2   Fail
X = fib_seq(35); assert(isequal(X(end),34) && length(X)==9)

i = 1 y = 1

Index exceeds the number of array elements (1). Error in fib_seq (line 5) y(i+1) = i+ y(i+2) Error in Test2 (line 1) X = fib_seq(35);

3   Fail
X = fib_seq(145); assert(isequal(X(end),144) && length(X)==12)

i = 1 y = 1

Index exceeds the number of array elements (1). Error in fib_seq (line 5) y(i+1) = i+ y(i+2) Error in Test3 (line 1) X = fib_seq(145);

4   Fail
X = fib_seq(4196); assert(isequal(X(end),4181) && length(X)==19)

i = 1 y = 1

Index exceeds the number of array elements (1). Error in fib_seq (line 5) y(i+1) = i+ y(i+2) Error in Test4 (line 1) X = fib_seq(4196);

5   Fail
X = fib_seq(987419996); assert(isequal(X(end),701408733) && length(X)==44)

i = 1 y = 1

Index exceeds the number of array elements (1). Error in fib_seq (line 5) y(i+1) = i+ y(i+2) Error in Test5 (line 1) X = fib_seq(987419996);

6   Fail
X = fib_seq(1134903171); assert(isequal(X(end),1134903170) && length(X)==45)

i = 1 y = 1

Index exceeds the number of array elements (1). Error in fib_seq (line 5) y(i+1) = i+ y(i+2) Error in Test6 (line 1) X = fib_seq(1134903171);

7   Fail
X = fib_seq(98691443031971); assert(isequal(X(end),72723460248141) && length(X)==68)

i = 1 y = 1

Index exceeds the number of array elements (1). Error in fib_seq (line 5) y(i+1) = i+ y(i+2) Error in Test7 (line 1) X = fib_seq(98691443031971);