MathGroup Archive 2003

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

Search the Archive

Re: defining a transform from two lists

  • To: mathgroup at smc.vnet.net
  • Subject: [mg40863] Re: defining a transform from two lists
  • From: Bill Rowe <listuser at earthlink.net>
  • Date: Tue, 22 Apr 2003 06:47:28 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

On 4/21/03 at 6:58 AM, nmoore at physics.umn.edu (Nathan Moore) wrote:

>Suppose I have two lists of similar length, p1={n[i],a[i]} and p2 =
>{n[i],b[i]} and I'd like to create a new list, p3 = { n[i], f[ a[i],
>b[i] ] } 

Look at MapThread.

Specifically

MapThread[{First@#1,f[Last@#1,Last@#2]}&,{p1,p2}]

will do what you want


  • Prev by Date: Re: Loading Packages On Startup
  • Next by Date: General::aofil-closing files after manual abort
  • Previous by thread: Re: defining a transform from two lists
  • Next by thread: Re: defining a transform from two lists