Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2004

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

Search the Archive

Re: NestList

  • To: mathgroup at
  • Subject: [mg50560] Re: NestList
  • From: "Michael Taktikos" <michael.taktikos at>
  • Date: Fri, 10 Sep 2004 04:06:00 -0400 (EDT)
  • References: <chpa26$jt6$>
  • Sender: owner-wri-mathgroup at

Yes, it is possible.

Example: You want to iterate the Cos-function 4 times to the starting value
NestList[Cos, x, 4]

The iterator can be written as pure function #+1&, so you can use a list of
the two pure functions and apply it
to a list with two starting values, {0,x}:

In[1]:= NestList[{#[[1]]+1,Cos[#[[2]] ]}&,{0,x},4]


Greetings from Hamburg,

Michael Taktikos

"Namrata Khemka" <namrata.khemka at> schrieb im Newsbeitrag
news:chpa26$jt6$1 at
> Hello everyone,
> I have a question regarding NestList function.
> I am applying a function on the expression n times.
> NestList [function, expr, n]
> However in my function I would like to know what is the current value
> of n. In other words I would like to know what iteration it is on.
> Is this possible?
> Thanks in advance.
> Namrata Khemka

  • Prev by Date: Re: NestList
  • Next by Date: Re: Re: Can't get graph to display when using ImplicitPlot!
  • Previous by thread: Re: NestList
  • Next by thread: Re: Re: NestList