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

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

Search the Archive

Re: proper way to manipulate lists?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg40198] Re: proper way to manipulate lists?
  • From: atelesforos at hotmail.com (Orestis Vantzos)
  • Date: Tue, 25 Mar 2003 14:49:12 -0500 (EST)
  • References: <b5p158$7sk$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

(#*{a,b})& /@ data
Read the Mathematica Book.. look for 'pure functions' and 'Map'
Orestis

Nathan Moore <nmoore at physics.umn.edu> wrote in message news:<b5p158$7sk$1 at smc.vnet.net>...
> I'm sure this is a one-liner, but it has stumped me for years.  Suppose
> I'm working with a 2-d array of data,
> 	data = {{x1,y1},{x2,y2}...{xN,yN}};
> and I want to transform the data according to,
> 	data2 = {{x1*a,y1*b},{x2*a,y2*b}...{xN*a,yN*b}};
> The only way I know to do this is to move the data to excel,
> performing the transform and then move the data back to Mathematica.  This
> is crazy - there must be a better way - is there?  Please tell me there
> is!
> 
> regards,
> 
> Nathan Moore, University of Minnesota Physics Department


  • Prev by Date: Re: proper way to manipulate lists?
  • Next by Date: Simplyfing Sum[Mod[f(k),y],{k,k0,n}] type expressions? (Newbie question)
  • Previous by thread: RE: proper way to manipulate lists?
  • Next by thread: Re: proper way to manipulate lists?