MathGroup Archive 2010

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

Search the Archive

Re: Assigning values to a list.

  • To: mathgroup at smc.vnet.net
  • Subject: [mg110103] Re: Assigning values to a list.
  • From: Peter Breitfeld <phbrf at t-online.de>
  • Date: Wed, 2 Jun 2010 02:04:05 -0400 (EDT)
  • References: <hu2g2d$l14$1@smc.vnet.net>

kevin wrote:

> Hi Guys,
>
>            I am a newbie to mathematica..Is there anyway to read
> values from 2 lists {n by 1} and {n by 1} to a new list {n by 2}
> without using loops.. eg say you have x = {1,3,5} any y = {2,4,6}, I
> will need a new list z ={{1,2},{3,4},{5,6}}.. Thanks in advance.
>

Transpose[{x,y}]

will do what you want.

//Peter
-- 
_________________________________________________________________
Peter Breitfeld, Bad Saulgau, Germany -- http://www.pBreitfeld.de


  • Prev by Date: Re: Deleting Duplicates
  • Next by Date: PDE, laplace, exact, should be simple...
  • Previous by thread: Re: Assigning values to a list.
  • Next by thread: Re: Assigning values to a list.