Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
1996
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

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