Re: Confused by levels in Outer
- To: mathgroup at smc.vnet.net
- Subject: [mg44157] Re: [mg44090] Confused by levels in Outer
- From: "Peter Pein" <nospam at spam.no>
- Date: Fri, 24 Oct 2003 04:24:41 -0400 (EDT)
- References: <200310220724.DAA06044@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Ken,
most likely your software is too up to date ;-)
$Version
"4.0 for Microsoft Windows (July 16, 1999)"
Outer[f, {a}, {{{a, b}, {b, c}}}, 1, 2]
{{{f[a, {a, b}], f[a, {b, c}]}}}
Peter Pein, Berlin
petsie at arcAND.de
replace && by || to write to me
----- Original Message -----
From: "Ken Morgan" <kemorgan at vt.edu>
To: mathgroup at smc.vnet.net
Subject: [mg44157] [mg44090] Confused by levels in Outer
> This makes sense:
> Outer[f, {a}, {{a, b}, {b, c}}, 1, 1]
> {{f[a, {a, b}], f[a, {b, c}]}}
>
> This makes sense:
> Outer[f, {a}, {{a, b}, {b, c}}, 1, 2]
> {{{f[a, a], f[a, b]}, {f[a, b], f[a, c]}}}
>
> This makes sense:
> Outer[f, {a}, {{{a, b}, {b, c}}}, 1, 1]
> {{f[a, {{a, b}, {b, c}}]}}
>
> But this doesn't make sense:
> Outer[f, {a}, {{{a, b}, {b, c}}}, 1, 2]
> {{{{f[a, a], f[a, b]}, {f[a, b], f[a, c]}}}}
>
> The last one gives the result I'd expect from Outer[f, {a}, {{{a, b}, {b,
> c}}}, 1, 3].
> It seems like it should give {{{f[a, {a, b}], f[a, {b, c}]}}}.
> Why doesn't it treat {a, b} and {b, c} as atomic elements?
>
> Thanks,
> Ken
>
>
- References:
- Confused by levels in Outer
- From: "Ken Morgan" <kemorgan@vt.edu>
- Confused by levels in Outer