Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
1996
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 1996

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

Search the Archive

Question: Applying a list of funcs to a list of expressions

  • To: mathgroup at smc.vnet.net
  • Subject: [mg2924] Question: Applying a list of funcs to a list of expressions
  • From: groskyd at gv.ssi1.com (David Rosky)
  • Date: Thu, 11 Jan 1996 01:11:34 -0500
  • Organization: Silicon Systems, Inc.

I would like to specify a list of functions such as:

funcs = {f1, f2, f3}

and a list of values to which the functions will be
applied:

vals = {val1, val2, val3}

I would then like to apply to each function to each corresponding value
respectively to obtain the following list:

DesiredOutputList = {f1[val1], f2[val2], f3[val3]}


I can do this explicitly by defining the functions in terms of the
explicit elements of the list such as f1[x_] := x[[1]]^2 and so on
for the other functions, but I was wondering if there is a built-in
way to apply a list of functions respectively to the elements of a list
of values which would be simpler and more efficient.  I looked through
the Mathematica book and nothing obvious popped out at me, but is seems
like such a simple concept that it must be there somewhere.

Thanks in advance,

--David
------------------ groskyd at gv.ssi1.com ------------------



==== [MESSAGE SEPARATOR] ====


  • Prev by Date: Re: Mathematica Plots -> Editing using Canvas or Illustrator ?
  • Next by Date: Re: columns
  • Previous by thread: Re: Unix Kernel with Windows frontend?
  • Next by thread: Question: Applying a list of funcs to a list of expressions