Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.math.mathematica

Topic: Q:Nicer than: Function[x,MapAt[Im,x,2]]/@data
Replies: 1   Last Post: Dec 6, 1996 11:30 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Martin Rommel

Posts: 11
Registered: 12/7/04
Q:Nicer than: Function[x,MapAt[Im,x,2]]/@data
Posted: Dec 2, 1996 10:28 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

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?







Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.