Problem 1997. Compute Fibonacci Number

Solution 3691023

Submitted on 17 Nov 2020 by 畅 徐
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
assert(isequal(fibonacci(1),1)) assert(isequal(fibonacci(2),1)) assert(isequal(fibonacci(5),5)) assert(isequal(fibonacci(7),13)) assert(isequal(fibonacci(13),233)) assert(isequal(fibonacci(15),610))

Elapsed time is 0.000122 seconds. Elapsed time is 0.000069 seconds. Elapsed time is 0.000271 seconds. Elapsed time is 0.000687 seconds. Elapsed time is 0.000852 seconds. Elapsed time is 0.000020 seconds.

Suggested Problems

More from this Author4

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!