Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 1999

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

Search the Archive

Re: Manipulating a list of pairs

  • To: mathgroup at
  • Subject: [mg19733] Re: [mg19689] Manipulating a list of pairs
  • From: BobHanlon at
  • Date: Mon, 13 Sep 1999 02:41:01 -0400
  • Sender: owner-wri-mathgroup at


lumpi[{f_, amp_}] := {f, Power[2 Pi f, 2] U / amp};

thelist = 
        "{x" <> ToString[k] <> ", y" <> ToString[k] <> "}"], {k, 5}];

The following expressions are equivalent

lumpi /@ thelist == 
  ({#1[[1]], (2*Pi*#1[[1]])^2*U/#1[[2]]} & ) /@ thelist == 
  (thelist /. {x_, y_} :> {x, (2*Pi*x)^2*U/y}) == 
  Cases[thelist, {x_, y_} :> {x, (2*Pi*x)^2*U/y}] == 
  MapThread[{#1, (2*Pi*#1)^2*U/#2} & , Transpose[thelist]]


However, I don't think they are any easier nor are they any easier to 

Bob Hanlon

In a message dated 9/11/1999 9:42:15 PM, 
hans.steffani at writes:

>I have a list of pairs and manipulate it with things like
>lumpi[{f_, amp_}]:={f, Power[2 Pi f,2] U / amp}
>Map[ lumpi, thelist]
>is there an easier way without introducing "lumpi" to do this?

  • Prev by Date: Re: compressed list output
  • Next by Date: Re: contourplots
  • Previous by thread: Re: Manipulating a list of pairs
  • Next by thread: Re: Manipulating a list of pairs