Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2005
*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 2005

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

Search the Archive

Re: How to reverse sign on the y's in a list of (x, y)'s?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg61261] Re: How to reverse sign on the y's in a list of (x, y)'s?
  • From: Helen Read <read at math.uvm.edu>
  • Date: Fri, 14 Oct 2005 05:53:53 -0400 (EDT)
  • References: <dikt77$4tm$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

sherifffruitfly at gmail.com wrote:

> Hi all,
> 
> This is really dumb, but I just don't know how to do it...
> 
> Import from excel gives me a list of ordered pairs, and I want the 2nd
> element of each pair to be of opposite sign. Sticking the negative sign
> in front of the entire Import statement reverses both the 1st and the
> 2nd elements (duh). How do I get just the second item to reverse sign?

v = your list of ordered pairs

Map[{#[[1]], -#[[2]]} &, v]

--
Helen Read
University of Vermont



  • Prev by Date: Re: How to reverse sign on the y's in a list of (x, y)'s?
  • Next by Date: Re: challenge problem
  • Previous by thread: Re: How to reverse sign on the y's in a list of (x, y)'s?
  • Next by thread: Re: How to reverse sign on the y's in a list of (x, y)'s?