Cody

Solution 2080348

Submitted on 4 Jan 2020 by William
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   Pass
n = 5; y_correct = [0,0,1,1,2]; assert(isequal(tribonacci(n),y_correct))

2   Pass
n = 11; y_correct = [0 0 1 1 2 4 7 13 24 44 81 ]; assert(isequal(tribonacci(n),y_correct))

3   Pass
n = 21; y_correct = [0 0 1 1 2 4 7 13 24 44 81 149 274 504 927 1705 3136 5768 10609 19513 35890]; assert(isequal(tribonacci(n),y_correct))

4   Pass
n = 30; y_correct =[ 0 0 1 1 2 4 7 13 24 44 81 149 274 504 927 1705 3136 5768 10609 19513 35890 66012 121415 223317 410744 755476 1389537 2555757 4700770 8646064]; assert(isequal(tribonacci(n),y_correct))