[TOC]

fibonacci

Fibonacci number

Usage

F = fibonacci(N)

Example

Input
fibonacci(0:10)
Output
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
Input
fibonacci(100) / fibonacci(99)
Output
ans =
 1.61803398874989
Input
gs=fibonacci(1:30)./fibonacci(0:29);
plot(gs,'-p','MarkerFaceColor','r')
xlabel('n')
title('Approximation of Golden Ratio')
Output

fibonacci