[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: suite

From: Alois Schloegl
Subject: Re: suite
Date: Sun, 12 Dec 2004 16:27:01 +0100
User-agent: Pan/ (As She Crawled Across the Table (Debian GNU/Linux))

On Sat, 11 Dec 2004 12:11:38 -0600, Mike Miller wrote:

> On Sat, 11 Dec 2004, adel.essafi wrote:
>> hi list
>> please, how can I define a suite in octave
>> U(n+1)=3*U(n)+2 (for example)
>> and calculate u(1000)
> A simple method:
> n=1000;
> U=zeros(1,n);
> U0=4; #or whatever you want
> U(1)=3*U0+2;
> for i=2:n,
>    U(i)=3*U(i-1)+2;
> end

Or you can use FILTER if you want to avoid the FOR-loop



Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:
How to fund new projects:
Subscription information:

reply via email to

[Prev in Thread] Current Thread [Next in Thread]