MathGroup Archive 1997

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

Search the Archive

Re: Changing only Y's in a list of points: How?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg6692] Re: Changing only Y's in a list of points: How?
  • From: earhart at athena.mit.edu (Elizabeth J Earhart)
  • Date: Fri, 11 Apr 1997 01:49:48 -0400 (EDT)
  • Organization: Massachvsetts Institvte of Technology
  • Sender: owner-wri-mathgroup at wolfram.com

In article <5icrvm$q9k at smc.vnet.net>,
David S. Pieczkiewicz <david at email.labmed.umn.edu> wrote:
>   pointlist = { {x1,y1}, {x2,y2}, {x3,y3}, ..., {xn,yn} };
>
>   Of course, there are numbers instead of the above symbols, but you get
>the picture. Now, suppose I'd like to "raise" or "lower" this list, in
>effect, changing all the y's by a constant, but leaving the x's alone.

You should be able to do this with
(#+{0,0.3})& /@ pointlist

(In full form, this would be written Map[(#+{0,0.3})&,pointlist].  You
might want to check out the discussion of 'Map' in the Mathematica
book - it's one of the most powerful functions in the program).

-Elizabeth




  • Prev by Date: Re: Fourier Help!!
  • Next by Date: Re: Singular Value Decomposition
  • Previous by thread: Mathematica for linux
  • Next by thread: Re: Changing only Y's in a list of points: How?