MathGroup Archive 2006

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

Search the Archive

Re: Modify a list of pure functions

  • To: mathgroup at smc.vnet.net
  • Subject: [mg70896] Re: Modify a list of pure functions
  • From: Roland Franzius <roland.franzius at uos.de>
  • Date: Wed, 1 Nov 2006 03:55:05 -0500 (EST)
  • Organization: Universitaet Hannover
  • References: <ehv8ts$g5i$1@smc.vnet.net>

. schrieb:
> Hi all,
> 
> I have a problem where I need to build up a list of pure functions that
> have been modified from a base pure function.  I'm not having much luck
> in getting it to work correctly, and was wondering if anyone had some
> good ideas.  A toy version of the problem is:
> 
> f = Sin[#]&
> listF = Table[(i f[##])&, {i, 5}]
> 
> What I'd hope to get is listF containing:
> {Sin[##]&, (2 Sin[##])&, (3 Sin[##])&, (4 Sin[##])&, (5 Sin[##])&}


Evaluate with ## and refunction the resulting Table

f = Sin[#]&

listF = Function@@@Table[{i f[##]}, {i, 5}]

	{Sin[#1] &, 2 Sin[#1] &, 3 Sin[#1] &, 4 Sin[#1] &, 5 Sin[#1] &}

or still more compact

Function/@(f[##]*Range[1,5])

-- 

Roland Franzius


  • Prev by Date: ShadowPlot3D
  • Next by Date: RE: FindRoot, suppressing complex interval-numbers
  • Previous by thread: ShadowPlot3D
  • Next by thread: RE: FindRoot, suppressing complex interval-numbers