Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: fibonacci numbers
Date: Wed, 19 Nov 2008 00:48:02 +0000 (UTC)
Organization: Xoran Technologies
Lines: 20
Message-ID: <gfvno1$mhd$1@fred.mathworks.com>
References: <gfv1n2$r4j$1@fred.mathworks.com> <gfvi5t$39q$1@fred.mathworks.com> <gfvju6$8er$1@fred.mathworks.com> <gfvltu$qpd$1@fred.mathworks.com> <gfvmfc$89e$1@fred.mathworks.com> <gfvn5a$edd$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-05-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1227055682 23085 172.30.248.35 (19 Nov 2008 00:48:02 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Wed, 19 Nov 2008 00:48:02 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1440443
Xref: news.mathworks.com comp.soft-sys.matlab:501618


"Maria " <mariaki16@hotmail.com> wrote in message <gfvn5a$edd$1@fred.mathworks.com>...
> yeah thats right but i've got a problem inputing a single number its have to outpout [-x:x]insteat of that i have this:
> 
> >> fibonacci(4)
> 
> ans =
> 
>      0     0     0     0     0     1     1     2     3

OK. Well, the left hand tail of the sequence obeys the difference equation

F(-k)=F(-k+2)-F(-k+1), k=0,1,...

You must solve this difference equation with boundary conditions

F(0)=0, F(1)=1

to get that half of the sequence.