fibonacciFibonacci number
F = fibonacci(N)N should be an array of non-negative real integers, not equal to Inf nor NaN.F is an array of the same size of N. Each element in F is the Fibonacci number of the corresponding element in N.F is empty if N is empty.N is large, the Fibonacci number is a double-precision floating-point approximation.fibonacci(0:10)
ans =
Columns 1 through 5:
0.000 1.000 1.000 2.000 3.000
Columns 6 through 10:
5.000 8.000 13.00 21.00 34.00
Column 11:
55.00
fibonacci(100) / fibonacci(99)
ans =
1.61803398874989
gs=fibonacci(1:30)./fibonacci(0:29);
plot(gs,'-p','MarkerFaceColor','r')
xlabel('n')
title('Approximation of Golden Ratio')
