MathGroup Archive 1996

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

Search the Archive

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


>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]}

Here's a solution:

Inner[#1[#2]&,{f1,f2,f3},{val1,val2,val3},List]

Regards,
  Dave Snead 
  76300,3545 at compuserve.com



  • Prev by Date: Comparison of Mathematica on Various Computers
  • Next by Date: Legend on graph with several plots: HOW??
  • Previous by thread: Re: Question: Applying a list of funcs to a list of expressions
  • Next by thread: Mathematica does not know where are my files. Help!!!