MathGroup Archive 2010

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

Search the Archive

Re: From list to list of arguments

  • To: mathgroup at smc.vnet.net
  • Subject: [mg113314] Re: From list to list of arguments
  • From: Norbert Marxer <marxer at mec.li>
  • Date: Sat, 23 Oct 2010 07:06:02 -0400 (EDT)
  • References: <i9r803$hp1$1@smc.vnet.net>

On Oct 22, 7:38 am, Sam Takoy <sam.ta... at yahoo.com> wrote:
> Hi,
>
> Suppose I have a list of arrays, say g = {a, b, c} where a, b, and c are
> arrays, and I would like to calculate
>
> Outer[Times, a, b, c]
>
> how do I do it?
>
> I tried
>
> Apply[Outer[Times,#]&, g], as in Apply[Outer[Times, #] &, {{1}, {1}}],
> but that does not yield the right answer. So the question is: how does
> one convert a list {a, b, c} into arguments to a function of variable
> number of arguments? Thanks!
>
> An auxiliary question: within the function f[x__] := ... what kind of
> object is x? It's not a list, but what is it?
>
> Many thanks in advance,
>
> Sam

Hello

Did you try
        Outer[Times, Sequence @@ g]

Also: you can see that
        FullForm[f[x__]]
gives
       f[Pattern[x,BlankSequence[]]]

Best Regards
Norbert Marxer




  • Prev by Date: Re: From list to list of arguments
  • Next by Date: Re: Two questions related to Arrays
  • Previous by thread: Re: From list to list of arguments
  • Next by thread: Re: From list to list of arguments