Mathematica 9 is now available
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: [mg19616] Re: [mg19599] Help: Outer of a list of lists
  • From: "David Park" <djmp at earthlink.net>
  • Date: Sat, 4 Sep 1999 21:09:19 -0400
  • Sender: owner-wri-mathgroup at wolfram.com

Joako,

Try

Outer[List, Sequence @@ A]

Look up Sequence in Help for further explanation. It does what you were attempting
with Infix.

David Park
djmp at earthlink.net
http://home.earthlink.net/~djmp/

>
>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}}}}
>In[3]:=
>(* or *)
>
>Outer[List,A[[1]],A[[2]],A[[3]]]
>Out[3]=
>{{{{a,c,e},{a,c,f}},{{a,d,e},{a,d,f}}},{{{b,c,e},{b,c,f}},{{b,d,e},{b,d,f}}}}
>In[4]:=
>(* but N and L can take different values,
>  so I need to obtain Outer List directly from A,
>  I tried several ways as Infix but without success*)
>
>Infix[A,","]
>Out[4]=
>{a,b},{c,d},{e,f}
>In[5]:=
>Outer[List,Infix[A,","]]
>Out[5]=
>Infix[{{{a,b},{c,d},{e,f}}},{","}]
>In[6]:=
>(* Is there any solution ?
>
>Regards
>
>Joako *)
>
>
>



  • Prev by Date: right Kronecker product
  • Next by Date: Re: Question about evaluation with Sum
  • Previous by thread: Help: Outer of a list of lists
  • Next by thread: Re: Help: Outer of a list of lists