Re: Joining 2D arrays
- To: mathgroup at smc.vnet.net
- Subject: [mg49160] Re: [mg49131] Joining 2D arrays
- From: Ken Levasseur <klevasseur at mac.com>
- Date: Mon, 5 Jul 2004 04:55:00 -0400 (EDT)
- References: <200407020601.CAA05445@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Jonathan:
Union will do it for the example you give.
In[5]:=
Union[A, B]
Out[5]=
{{1, 2}, {3, 4}, {5, 6}, {6, 7}, {8, 9}, {10, 11},
{12, 13}}
For tables of the size you describe, you might need to do something
else.
Ken Levasseur
On Jul 2, 2004, at 2:01 AM, Jonathan Greenberg wrote:
> This is a total newbie question, but if I have two table of a fixed
> number
> of columns and an arbitrary number of rows, whats the easiest/most
> efficient
> way to join them together (basically, how do I add entries to a
> "database"
> in Mathematica) -- that database will eventually be perhaps > 1,000,000
> entries long...
>
> A={{1,2},{3,4},{5,6}}
> B={{6,7},{8,9},{10,11},{12,13}}
>
> I want:
>
> {{1,2},{3,4},{5,6},{6,7},{8,9},{10,11},{12,13}}
>
> --j
>
- References:
- Joining 2D arrays
- From: Jonathan Greenberg <greenberg@ucdavis.edu>
- Joining 2D arrays