MathGroup Archive 2010

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

Search the Archive

Re: How to apply a list of functions?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg112862] Re: How to apply a list of functions?
  • From: Bill Rowe <readnews at sbcglobal.net>
  • Date: Mon, 4 Oct 2010 06:04:56 -0400 (EDT)

On 10/3/10 at 3:38 AM, sam.takoy at yahoo.com (Sam Takoy) wrote:

>How do I apply {Sin, Cos} to x to get {Sin[x], Cos[x]}?

Use Through, e.g.,

In[3]:= Through[{Sin, Cos}[x]]

Out[3]= {sin(x),cos(x)}

Or Map, e.g.

In[4]:= #[x] & /@ {Sin, Cos}

Out[4]= {sin(x),cos(x)}



  • Prev by Date: How to get Tooltip value
  • Next by Date: Re: How to apply a list of functions?
  • Previous by thread: How to apply a list of functions?
  • Next by thread: Re: How to apply a list of functions?