Re: Applying a list of 2D paramters to a mathematica function
- To: mathgroup at smc.vnet.net
- Subject: [mg68061] Re: Applying a list of 2D paramters to a mathematica function
- From: albert <awnl at arcor.de>
- Date: Fri, 21 Jul 2006 17:35:58 -0400 (EDT)
- References: <e9q9h8$829$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Curry Taylor wrote:
>
> I have (for simplicity) something like this:
>
> f[x_, y_] := x+y;
>
> I want to use this function for a variety of parameters in a
> list:
>
> indices = {{a,b}, {c,d}, {e,f}, ..}
>
> so that I get
>
> {a+b, c+d, e+f, ..}
>
> Doing the intuitive thing (for me)
>
> f /@ indices
>
> results in
>
> {f[{a, b}], f[{c, d}], f[{e, f}], ..}
>
> but what I want is
>
> {f[a, b], f[c, d], f[e, f], ..}
Apply[f,indices,{1}]
hth,
albert