MathGroup Archive 1996

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

Search the Archive

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

  • To: mathgroup at smc.vnet.net
  • Subject: [mg5443] Re: Q:Nicer than: Function[x,MapAt[Im,x,2]]/@data
  • From: hibbarda at central.edu (Al Hibbard)
  • Date: Sat, 7 Dec 1996 00:26:19 -0500
  • Organization: Central College, Iowa
  • Sender: owner-wri-mathgroup at wolfram.com

In article <57usip$3cb at dragonfly.wolfram.com>, rommel at bc.edu writes:
>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?
>
You might consider Map[Im[#[[2]]]&, data].

Al Hibbard


  • Prev by Date: Re: How can I Flatten from the inside out, not the outside in?
  • Next by Date: Greek Letters subscript shortcut
  • Previous by thread: Q:Nicer than: Function[x,MapAt[Im,x,2]]/@data
  • Next by thread: Re: Q:Nicer than: Function[x,MapAt[Im,x,2]]/@data