MathGroup Archive 2005

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

Search the Archive

Re: Simple List manipulation question


DAN BIKLE wrote:
> Dear Mathematica Experts,
> 
> Suppose I have a list like this:
> {{1, 2, 3, 4, 5}, {1, 4, 9, 16, 25}}
> 
> Is there a quick way to transform it into this:
> 
> {{1,1},{2,4},{3,9},{4,16},{5,25}}
> 
> ??
> 
> -Dan
> --
> dbikle at gmail.com
> 
In[1]:=
Transpose[{{1, 2, 3, 4, 5}, {1, 4, 9, 16, 25}}]

Out[1]=
{{1, 1}, {2, 4}, {3, 9}, {4, 16}, {5, 25}}

You should have a look at

http://documents.wolfram.com/mathematica/book/section-2.4

(The Mathematica Book is also available in the help browser).

Best regards,
/J.M.


  • Prev by Date: Re: How build a function repeating the same pattern?
  • Next by Date: Re: Re: Re: Weird behavior of SparseArray
  • Previous by thread: Re: Simple List manipulation question
  • Next by thread: How I attach Help Browser to TimeSeries Pack?