MathGroup Archive 2012

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

Search the Archive

Re: How to Invert Rows and Columns for a Grid of List of Lists


On 4/6/2012 5:07 AM, brtubb at pdmusic.org wrote:
> Consider two lists
>
> a = {{1,2,3},{4,5,6},{7,8,9}};
> b = {{1,4,7},{2,5,8},{3,6,9}};
>
> I want to transform a "into" b

Transpose[]?

a = {{1, 2, 3}, {4, 5, 6}, {7, 8, 9}};
b = Transpose[a]

---> {{1, 4, 7}, {2, 5, 8}, {3, 6, 9}}

--Nasser



  • Prev by Date: Re: How to Invert Rows and Columns for a Grid of List of Lists
  • Next by Date: netCDF 4?
  • Previous by thread: Re: How to Invert Rows and Columns for a Grid of List of Lists
  • Next by thread: Stuck solving recurrence formula