MathGroup Archive 1996

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

Search the Archive

Q:Nicer than: Function[x,MapAt[Im,x,2]]/@data

  • To: mathgroup at smc.vnet.net
  • Subject: [mg5389] Q:Nicer than: Function[x,MapAt[Im,x,2]]/@data
  • From: rommel at bc.edu
  • Date: Thu, 5 Dec 1996 14:50:25 -0500
  • Organization: Boston College
  • Sender: owner-wri-mathgroup at wolfram.com

I want to ListPlot the imaginary part of data:

data={{x0,z0},{x1,z1},{x2,z2}}

The x? are real, the z? complex.

My simple but ugly solution was 
 
Transpose[{Transpose[data][[1]],Im[Transpose[data][[2]]]}]

after reading a little I came to the shorter

Function[x,MapAt[Im,x,2]]/@data 

Is there a nicer way to do it?


  • Prev by Date: Re: Need help with solving problem
  • Next by Date: Re: Need help with solving problem
  • Previous by thread: Re: XMathematica: can't open display, exiting...
  • Next by thread: Q:Nicer than: Function[x,MapAt[Im,x,2]]/@data