Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2007
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2007

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

Search the Archive

Re: Passing a list as seperate parameters?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg73215] Re: Passing a list as seperate parameters?
  • From: Peter Breitfeld <phbrf at t-online.de>
  • Date: Thu, 8 Feb 2007 03:30:56 -0500 (EST)
  • References: <eqc71p$qs7$1@smc.vnet.net>

Azumanga schrieb:
> I have a recuring problem in using mathematica, which I'm sure there
> must be a simple fix for, but I've looked through the manual and can't
> find it.
>
> As an example, I build up the list { {a,b},{c,d} }, and I want to find
> the union of it's elements.
>
> At first glance, I want Union. However, Union wants it's input as
> Union[{a,b},{c,d}], Union[{{a,b},{c,d}}] doesn't do anything.
>
> In general I get around this by fold, but it seems there should be a
> simpler method?
>
>

is

In= Union@@{{a,b},{c,d}}
Out={a,b,c,d}

what you want?

Gruss Peter
-- 
==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==
Peter Breitfeld, Bad Saulgau, Germany -- http://www.pBreitfeld.de


  • Prev by Date: Re: String to number
  • Next by Date: Fitting data to a curve
  • Previous by thread: Re: Passing a list as seperate parameters?
  • Next by thread: Re: Passing a list as seperate parameters?