No BSD License  

Highlights from
Fibonacci.m

4.5

4.5 | 2 ratings Rate this file 50 Downloads (last 30 days) File Size: 628 Bytes File ID: #5093

Fibonacci.m

by David Terr

 

03 Jun 2004 (Updated 08 Jun 2004)

Given an integer n, return the nth Fibonacci number.

| Watch this File

File Information
Description

Given an integer n, return the nth Fibonacci number.

MATLAB release MATLAB 6.0 (R12)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (4)
03 Oct 2004 hemanth korrapati

very good site

16 Nov 2007 Yuko Bills  
03 Dec 2007 mat kol  
09 Jan 2012 Ragaar Ashnod

Was just playing around:
L34: If you make it an mpower operation this function can support vector inputs.

fib = round( alpha.^n / sqrt(5) );

Please login to add a comment or rating.
Updates
08 Jun 2004

I fixed the input checking.

Tag Activity for this File
Tag Applied By Date/Time
symbolic math David Terr 22 Oct 2008 07:21:49
fibonacci number David Terr 22 Oct 2008 07:21:49
integer David Terr 22 Oct 2008 07:21:49
n David Terr 22 Oct 2008 07:21:49
nth David Terr 22 Oct 2008 07:21:49
return David Terr 22 Oct 2008 07:21:49
fibonacci number Ben Omesi 11 May 2009 02:08:28
fibonacci number Michael Völker 10 Jan 2011 09:03:17
fibonacci number Daniel 11 Jan 2011 05:27:39

Contact us at files@mathworks.com