Re: How to convert a list of functions in a list valued function
- To: mathgroup at smc.vnet.net
- Subject: [mg28295] Re: How to convert a list of functions in a list valued function
- From: Mariusz Jankowski <mjkcc at usm.maine.edu>
- Date: Sat, 7 Apr 2001 03:44:56 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
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
- Follow-Ups:
- Re: How to convert a list of functions in a list valued function
- From: Matthias Hertel <wir95cgu@studserv.uni-leipzig.de>
- Re: How to convert a list of functions in a list valued function