MathGroup Archive 2006

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

Search the Archive

Re: How to extract functions from a list and call them with any argument?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg65942] Re: How to extract functions from a list and call them with any argument?
  • From: "Norbert Marxer" <marxer at mec.li>
  • Date: Mon, 24 Apr 2006 06:01:53 -0400 (EDT)
  • References: <e2fkto$bp7$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Hallo

With your definition of functionlist

funclist = {Sin[x], x^3, Cos[x]^2};
funclist[[3]] /. x -> t

will give what you want.

Or you could use Pure function definitions. Then

funclist = {Sin, #^3 &, Cos[#]^2 &};
funclist[[3]][t]

will give what you want.

Best regards
Norbert Marxer
www.mec.li


  • Prev by Date: Re: matrix operations -- shared data vs copied
  • Next by Date: Re: How to remove extra empty lines generated when exporting to HTML?
  • Previous by thread: Re: How to extract functions from a list and call them with any argument?
  • Next by thread: Re: How to extract functions from a list and call them with any argument?