MathGroup Archive 2010

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

Search the Archive

Re: How to apply a list of functions?


#@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?