MathGroup Archive 2010

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

Search the Archive

Re: union table

  • To: mathgroup at smc.vnet.net
  • Subject: [mg108209] Re: union table
  • From: dh <dh at metrohm.com>
  • Date: Wed, 10 Mar 2010 06:29:18 -0500 (EST)
  • References: <hn2mg7$47r$1@smc.vnet.net>

Hi Maria,
Union only works with elements of a list. Therefore, we must change your 
columns to elements. Toward this aim, we first transpose the change 
columns to rows. Then we make the rows into "elements" by wrapping them 
into a undefined function (e.g. fun). Then we apply Union, replace fun 
by Identity and transpose rows back to columns. Here is an example:
a1 = {{1, 2}, {3, 4}};
a2 = {{5, 2, 6}, {7, 4, 8}};

a1 = fun /@ Transpose[a1];
  a2 = fun /@ Transpose[a2];

Transpose[Union[a1, a2] /. fun -> Identity] // TableForm

Daniel


On 08.03.2010 12:19, maria giovanna dainotti wrote:
> Dear Mathgroup,
> I need to join two table in which one column should be the same. And if it is not the same at the same position I would like to find the way that Math can match the column when for example the tenth column of the first table should be the same of the forth column of the second table.
>
> AI could do also with a do operation but the lenght of the table can be also different.
>
> Is there a more general method to figure out this problem?
> for example with union Union[{DataFitend},{DataFitLx}]
> it returns all the table instead I would like to eliminate one column that it is the same.
> how can i do?
> Thanks a lot
> Maria
>


-- 

Daniel Huber
Metrohm Ltd.
Oberdorfstr. 68
CH-9100 Herisau
Tel. +41 71 353 8585, Fax +41 71 353 8907
E-Mail:<mailto:dh at metrohm.com>
Internet:<http://www.metrohm.com>



  • Prev by Date: Re: ZTransform for a non-causal unstable signal. How to make Mathematica
  • Next by Date: Re: ZTransform for a non-causal unstable signal. How to make Mathematica gives correct result?
  • Previous by thread: Re: union table
  • Next by thread: Re: Putting a Plot inside a Graphics function with other