Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Solution 353369

Submitted on 16 Nov 2013 by J-G van der Toorn

Correct

30Size
Leading solution size is 13.
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

Test Suite

Test
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))