Path: news.mathworks.com!not-for-mail
From: "John D'Errico" <woodchips@rochester.rr.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: To display big number in all digits form.
Date: Thu, 19 Mar 2009 14:38:01 +0000 (UTC)
Organization: John D'Errico (1-3LEW5R)
Lines: 44
Message-ID: <gptlc9$ra8$1@fred.mathworks.com>
References: <gps84r$1e2$1@news.onet.pl> <gptja9$hml$1@news.onet.pl> <gptk8m$8jd$1@fred.mathworks.com> <gptkie$kcq$1@news.onet.pl>
Reply-To: "John D'Errico" <woodchips@rochester.rr.com>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1237473481 27976 172.30.248.37 (19 Mar 2009 14:38:01 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Thu, 19 Mar 2009 14:38:01 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 869215
Xref: news.mathworks.com comp.soft-sys.matlab:526146


ZikO <zebik@op.pl> wrote in message <gptkie$kcq$1@news.onet.pl>...
> > Can't you do something recursive like you can with Miaxima?  This is one of their examples...
> 
> I don't understand it.
> 
> > fib[0]:0;
> > fib[1]:1;
> > fib[n]:=fib[n-1]+fib[n-2];
> 
> is this still MATLAB code?
> 
> > fib(1476);
> > 
> > 13069892237633993180363115538027198309839244390741264072600665946019279\
> > 307047923174028868108777701772109546315497901227623432224693693964718536670636\
> > 848936266084414744994134846280092275581896963474334898291642495406274413596986\
> > 561540727649241065372177459066954480149083764916173209597265806463003379334717\
> > 1632
> 
> and how did u obtain that?

Just do it in matlab.

http://www.mathworks.com/matlabcentral/fileexchange/22725

fib = vpi(zeros(1,1476));
fib(1) = 1;
fib(2) = 1;

for i = 3:1476
   fib(i) = fib(i-1) + fib(i-2);
end

fib(end)
ans =
130698922376339931803631155380271983098392443907
412640726006659460192793070479231740288681087777
017721095463154979012276234322246936939647185366
706368489362660844147449941348462800922755818969
634743348982916424954062744135969865615407276492
410653721774590669544801490837649161732095972658
064630033793347171632                                                

John