Path: news.mathworks.com!newsfeed-00.mathworks.com!news.kjsl.com!newsfeed.stanford.edu!newshub.sdsu.edu!flph200.ffdc.sbc.com!prodigy.net!flph199.ffdc.sbc.com!prodigy.com!flpi107.ffdc.sbc.com!nlpi064.nbdc.sbc.com.POSTED!ffbda4aa!not-for-mail
Reply-To: "Nasser Abbasi" <nma@12000.org>
From: "Nasser Abbasi" <nma@12000.org>
Newsgroups: comp.soft-sys.matlab
References: <grsv8d$sol$1@fred.mathworks.com>
Subject: Re: Help with random number generator in matlab
Lines: 34
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.3138
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3350
Message-ID: <bKnEl.24440$Ws1.11349@nlpi064.nbdc.sbc.com>
NNTP-Posting-Host: 75.37.151.32
X-Complaints-To: abuse@prodigy.net
X-Trace: nlpi064.nbdc.sbc.com 1239549959 ST000 75.37.151.32 (Sun, 12 Apr 2009 11:25:59 EDT)
NNTP-Posting-Date: Sun, 12 Apr 2009 11:25:59 EDT
Organization: at&t http://my.att.net/
X-UserInfo1: [[PAPDON[ZRUS_ASZP^D]VDBAZOZ@GXOXZYT]UEK@YUDUWYAKVUOPCW[ML\JXUCKVFDYZKBMSFX^OMSAFNTINTDDMVW[X\THOPXZRVOCJTUTPC\_JSBVX\KAOTBAJBVMZTYAKMNLDI_MFDSSOLXINH__FS^\WQGHGI^C@E[A_CF\AQLDQ\BTMPLDFNVUQ_VM
Date: Sun, 12 Apr 2009 08:25:57 -0700
Xref: news.mathworks.com comp.soft-sys.matlab:532152


"Alex" <a.shan@hotmail.co.uk> wrote in message 
news:grsv8d$sol$1@fred.mathworks.com...

This is the first time ive used series in matlab and I need some help.
> m file:
>
> n = 2:(d - 1)
> I(1) = 1
> I(2) = 1
> I(n+1) = n*A + B*I(n)*I(n-1)
>
> Can anyone give me push in the right direction, thanks

You did not give values for A, B, but may be you want a loop?

d=5;
A=1;B=2;
I=zeros(d,1);
I(1) = 1;
I(2) = 1;

for n = 2:(d - 1)
  I(n+1) = n*A + B*I(n)*I(n-1);
end

I =
     1
     1
     4
    11
    92