Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
1999
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 1999

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

Search the Archive

Re: Help: Outer of a list of lists

  • To: mathgroup at smc.vnet.net
  • Subject: [mg19631] Re: Help: Outer of a list of lists
  • From: Paul Abbott <paul at physics.uwa.edu.au>
  • Date: Mon, 6 Sep 1999 04:20:45 -0400
  • Organization: University of Western Australia
  • References: <7qrrui$4r6$10@dragonfly.wolfram.com>
  • Sender: owner-wri-mathgroup at wolfram.com

Joako wrote:

> In[1]:=
> (* I've got a list of lists as A *)
>
> A={{a,b},{c,d},{e,f}}
> Out[1]=
> {{a,b},{c,d},{e,f}}
> In[2]:=
> (* Where the number of sublists is N and the lengh of every sublist is L,
>   and I want to obtain the Outer list of the sublists, obviously I can
> do: *)
>
> Outer[List,{a,b},{c,d},{e,f}]
> Out[2]=
> {{{{a,c,e},{a,c,f}},{{a,d,e},{a,d,f}}},{{{b,c,e},{b,c,f}},{{b,d,e},{b,d,f}}}}
> (* but N and L can take different values,
>   so I need to obtain Outer List directly from A,

Outer[List, Sequence @@ A]


____________________________________________________________________
Paul Abbott                                   Phone: +61-8-9380-2734
Department of Physics                           Fax: +61-8-9380-1014
The University of Western Australia
Nedlands WA  6907                     mailto:paul at physics.uwa.edu.au
AUSTRALIA                            http://physics.uwa.edu.au/~paul

            God IS a weakly left-handed dice player
____________________________________________________________________




  • Prev by Date: Re: Problem with the zero-term of Fourier[]
  • Next by Date: Re: Manipulation of equations and inequalities in "high-school style"
  • Previous by thread: Re: Help: Outer of a list of lists
  • Next by thread: RE: Re: Re: Re: Re: circumference of an ellipse