MathGroup Archive 2001

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

Search the Archive

Re: newbie: all possible sums of two lists

  • To: mathgroup at smc.vnet.net
  • Subject: [mg30683] Re: newbie: all possible sums of two lists
  • From: "OBrien-Malone" <dot at dot.dot>
  • Date: Sat, 8 Sep 2001 02:22:25 -0400 (EDT)
  • Organization: The University of Western Australia
  • References: <9n17po$24b$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Outer[Plus, {1, 2, 3}, {10, 20, 30}]

gives

{{11, 21, 31}, {12, 22, 32}, {13, 23, 33}}


"Outer" because you want the generalized outer product. Plus because you
want the sum, not the products (in which case you would have had Times).
Cheers,

Mark.




  • Prev by Date: Re:convert graphics
  • Next by Date: How solve a system of ODE with periodic coeffs.
  • Previous by thread: Re: Fitting to complex values
  • Next by thread: Re: newbie: all possible sums of two lists