Re: Re: Need Help
- To: mathgroup at smc.vnet.net
- Subject: [mg94652] Re: [mg94637] Re: Need Help
- From: "Oyedeji, Kale" <koyedeji at morehouse.edu>
- Date: Fri, 19 Dec 2008 07:22:39 -0500 (EST)
- References: <200812181222.HAA00451@smc.vnet.net>
Bill, thanks for your comment. I have two iterative implicit functions S[k] and R[k] for which I plotted these functions versus k. But now wants to see the effect of including a random function in the expression for S[k]. Daniel made suggestion that seem to work except that I was getting some error message from his suggestion shown below. The error message is Do::itform: Argument R[k+1]=f S[k] R[k] at position 2 does not have the correct form for an iterator. >>. Will someone please help out. I spent hours in the Help pages of Mathematica, ver 6 without success. I am afraid to load ver 7 as of now. 'Kale B = 8.; f = 3. 10^-5; n = 10; S[0] = 3400; R[0] = 9; Do[ S[k + 1] = R[k]*B Random[] - f*S[k]*R[k]; R[k + 1] = f*S[k]*R[k]; , {k, 0, 10}] -----Original Message----- From: Bill Rowe [mailto:readnews at sbcglobal.net] Sent: 18 December 2008 07:22 To: mathgroup at smc.vnet.net Subject: [mg94652] [mg94637] Re: Need Help On 12/17/08 at 6:33 AM, koyedeji at morehouse.edu (Oyedeji, Kale) wrote: >Thannks Daniel for your advice. I changed Evaluate to RSolve but >still got the same result. What I wanted was a calculation of S[k] >and R[k] for every k. I wanted a random number generated for each k. >I expect S[1]= some number, R[1]= some number for each k. >Thanks also for calling my attention to CopyAs.Plain Text. >'Kale >With[{B=8,f=3x10^-5}, >sol=RSolve[{S[k+1]==R[k]*B*Table[Random[],{10000}]-f*S[k]*R[k],R[k= +1 >]==f*S[k]*R[k], S[0]==3400, R[0]==9}, {S,R}, {k,0,10000}]] It is still unclear as to what you are trying to accomplish here. RSolve is meant to solve a recurrence relationship. That is find a set of rules relate the n+1th member of a sequence to some number of previous sequence values that can reproduce the sequence. That is RSolve is trying to find rules of the form f[n+1] == a g[n] + b h[n-1] + ... I don't see how you can expect to find any consistent set of rules if you substitute random integers for the arguments. So, what is it you are trying to accomplish here?
- References:
- Re: Need Help
- From: Bill Rowe <readnews@sbcglobal.net>
- Re: Need Help