MathGroup Archive 2001

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

Search the Archive

Re: How to convert a list of functions in a list valued function


Thomas Neff wrote:

> I have a list of functions, say
> 
> funlist = {f1, f2, f3, ..., fn}
> 
> I want to construct a function f, so that
> 
> f[x] gives the list {f1[x], f2[x], f3[x], ... fn[x]}
> 
> f[x_] = funlist[x] doesn't work ;-(
> 
> Is there an elegant way to do this in Mathematica ?
> 
> 
> Thanks
> 
> Thomas
> 


Thomas, what you want is to Map the following pure function #[x]& over your 
list of functions:

f[x_] := Map[ #[x]&, {f1,f2,f3,f4}]


Mariusz



==============================================
Dr. Mariusz Jankowski
University of Southern Maine
mjkcc at usm.maine.edu


  • Prev by Date: Re: Saving sound waveforms
  • Next by Date: Accelerating remote mathematica display
  • Previous by thread: Re: Laplace Transforms of piecewise continuous functions
  • Next by thread: Re: How to convert a list of functions in a list valued function