MathGroup Archive 2002

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

Search the Archive

Re: Re: finding functions based on input and output tables

  • To: mathgroup at smc.vnet.net
  • Subject: [mg33500] Re: [mg33467] Re: [mg33425] finding functions based on input and output tables
  • From: BobHanlon at aol.com
  • Date: Sun, 24 Mar 2002 01:43:53 -0500 (EST)
  • Sender: owner-wri-mathgroup at wolfram.com

In a message dated 3/22/02 6:00:48 AM, tgarza01 at prodigy.net.mx writes:

>I'm not altogether sure I understand your question, but...
>
>In[1]:=
>a={a1,a2,a3};
>b={b1,b2,b3};
>
>In[3]:=
>c=fn[#[[1]],#[[2]]]&/@Transpose[{a,b}]
>Out[3]=
>{fn[a1,b1],fn[a2,b2],fn[a3,b3]}
>

You can perform this operation with Thread

a={a1,a2,a3};
b={b1,b2,b3};

c=Thread[fn[a,b]]

{fn[a1, b1], fn[a2, b2], fn[a3, b3]}


Bob Hanlon
Chantilly, VA  USA


  • Prev by Date: A Resource For Learning Mathematica
  • Next by Date: [Q] Encoding
  • Previous by thread: Re: finding functions based on input and output tables
  • Next by thread: re: finding functions based on input and output tables