MathGroup Archive 2005

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: defining a recursive formula?


On 3/4/05 at 5:08 AM, illuzioner at adelphia.net (lou zion) wrote:

>can someone help me represent the following?

>i have a quantity p[R_] := i* R -a

>i need to compute

>F[N_]  := p[p[p[p[p[R]]]]]  to N levels deep.

>how can i do this?

Use Nest as in

Nest[p, R, n]

Note, you should not use N as a variable name since this is already used for system function. In general, it is a good idea to use lower case when naming symbols you define to avoid conflict with built in symbols.
--
To reply via email subtract one hundred and four


  • Prev by Date: Re: defining a recursive formula?
  • Next by Date: Re: Re: Rearranging a data array containing calendrical as well as data entries.
  • Previous by thread: Re: defining a recursive formula?
  • Next by thread: Re: defining a recursive formula?