Re: How to deal with big matrix?

• To: mathgroup at smc.vnet.net
• Subject: [mg116636] Re: How to deal with big matrix?
• From: Ray Koopman <koopman at sfu.ca>
• Date: Tue, 22 Feb 2011 04:44:10 -0500 (EST)
• References: <ijv26p\$73d\$1@smc.vnet.net>

On Feb 21, 5:06 pm, Szymon Roziewski <szymon.roziew... at gmail.com>
wrote:
> Hello there,
>
> I have quite big matrix with let say 1000 rows and 1100 columns.
> Each of element of this matrix is a point on a surface e.g. {1.232,12.123}
> How can I quickly get first element of each point for whole matrix and put
> it in a vector (1000*1100 - this will be a length of that vector) without do
> it in a nested loop (Do[Do[...]])?
> And the similar to get the second element of each point into vector.
>
> kind regards,
> Szymon Roziewski

xy = {{{x11,y11},{x12,y12},{x13,y13},{x14,y14}},
{{x21,y21},{x22,y22},{x23,y23},{x24,y24}},
{{x31,y31},{x12,y32},{x33,y33},{x34,y34}}};

{x,y} = Flatten /@ Transpose[xy,{2,3,1}]

{{x11, x12, x13, x14, x21, x22, x23, x24, x31, x12, x33, x34},
{y11, y12, y13, y14, y21, y22, y23, y24, y31, y32, y33, y34}}

• Prev by Date: Using Notation Package in myPackage
• Next by Date: Re: Delete elements from list..
• Previous by thread: Re: How to deal with big matrix?
• Next by thread: Re: How to deal with big matrix?