MathGroup Archive 1995

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

Search the Archive

Re: MapIndexed (was: Re: RealDigits)

  • To: mathgroup at christensen.cybernetics.net
  • Subject: [mg1868] Re: MapIndexed (was: Re: [mg1741] RealDigits)
  • From: Scott.A.Hill at williams.edu (Lancelot)
  • Date: Wed, 9 Aug 1995 22:39:21 -0400
  • Organization: Williams College, Williamstown MA

In article <DCvFrD.Bs0 at wri.com>,
Dave Wagner <wagner at bullwinkle.cs.Colorado.EDU> wrote:
>what is the motivation behind MapIndexed?  I know that there usually
>is a well-thought-out reason for the existence of any given Mathematica
>function, although many of them are redundant.  What problems did
>the designers of Mathematica have in mind when they created this
>function?

	Well, I know I used MapIndexed recently to write a version of
the trapezoidal method of numerical integration (NIntegrate wasn't
cooperating with me at the time); if the index wasn't one or the end
of the list, I multiplied the entry by two.  Inefficient?  I'm sure.
A better way to do it functionally?  Probably.  Maybe MapIndexed was
provided for people who like to program in a functional sort of way,
but don't want to put too much time into developing very clever bits
of code.  Mathematica is useful to the novice user as well as to the
expert; perhaps MapIndexed is a nod in that direction....

Whatever.

/
:@-) Scott
\

http://student_97ffa.williams.edu/~shill


  • Prev by Date: Mathematica for Linux
  • Next by Date: Need help with NonlinearFit
  • Previous by thread: MapIndexed (was: Re: RealDigits)
  • Next by thread: Need help with NonlinearFit