Re: buliding on functions
- To: mathgroup at smc.vnet.net
- Subject: [mg79073] Re: buliding on functions
- From: Jean-Marc Gulliet <jeanmarc.gulliet at gmail.com>
- Date: Tue, 17 Jul 2007 03:31:18 -0400 (EDT)
- Organization: The Open University, Milton Keynes, UK
- References: <f7f2pb$o7k$1@smc.vnet.net>
JGBoone at gmail.com wrote: > so i have a group functions that i want to work on three list at the > same time. everytime i've tryed to get mathematica to run through all > at the smae time. i find out the functions only acted on one list. any > ideas? And *Thread* has been of no help? In[1]:= f[x_, y_, z_] = x + y + z; Thread[f[{a, b, c}, {x, y, z}, {1, 2, 3}]] Out[2]= {1 + a + x, 2 + b + y, 3 + c + z} In[3]:= g[x_, y_, z_] = x - y*z; (Thread[#1[{a, b, c}, {x, y, z}, {1, 2, 3}]] & ) /@ {f, g} Out[4]= {{1 + a + x, 2 + b + y, 3 + c + z}, {a - x, b - 2*y, c - 3*z}} Regards, Jean-Marc