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: [mg112870] Re: How to apply a list of functions?
  • From: Bob Hanlon <hanlonr at cox.net>
  • Date: Mon, 4 Oct 2010 06:06:25 -0400 (EDT)

#@x & /@ {Sin, Cos}

{Sin[x], Cos[x]}

However, there is no advantage to doing this unless the argument (x) is longer.

#@(freq*time + initPhase) & /@ {Sin, Cos}

{Sin[initPhase + freq time], Cos[initPhase + freq time]}

also

Through[{Sin, Cos}[x]]

{Sin[x], Cos[x]}


Bob Hanlon

---- Sam Takoy <sam.takoy at yahoo.com> wrote: 

=============
Hi,

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

Many thanks in advance,

Sam



  • Prev by Date: For loop outputs to a list
  • Next by Date: Re: How to apply a list of functions?
  • Previous by thread: Re: How to apply a list of functions?
  • Next by thread: Re: How to apply a list of functions?