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: Plus sets in mathematica..?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg75954] Re: Plus sets in mathematica..?
  • From: Norbert Marxer <marxer at mec.li>
  • Date: Mon, 14 May 2007 03:32:13 -0400 (EDT)
  • References: <f26ocl$4tn$1@smc.vnet.net>

On 13 Mai, 12:13, changbo <e-chan... at hanmail.net> wrote:
> I want to make a function "f", its domain is every thinkable two sets, an=
d the result is =C2=A0{a+b | a=E2=88=88A,b=E2=88=88B} for A,B.
>
> =C2=A0ex) A={1,2,3}, B={40,50,60,70},
> =C2=A0then I have f[A,B] as
> =C2=A0{41,42,43,51,52,53,61,62,63,71,72,73}.
>
> =C2=A0How can I construct function "f"? Let me know the source.. Thank yo=
u very much

Hello

You could use:

f[a_, b_] := Flatten[Outer[Plus, a, b]]

Best Regards
Norbert Marxer



  • Prev by Date: Re: Why Sort[{"AX", "!D", "EX"}] -> {"AX", "!D", "EX"} ?
  • Next by Date: Re: Plus sets in mathematica..?
  • Previous by thread: Re: Plus sets in mathematica..?
  • Next by thread: Re: Plus sets in mathematica..?