|
[Date Index]
[Thread Index]
[Author Index]
Re: Multiply 2 Lists together in a certain way
- To: mathgroup at smc.vnet.net
- Subject: [mg26938] Re: Multiply 2 Lists together in a certain way
- From: "Paul Lutus" <nospam at nosite.com>
- Date: Sat, 27 Jan 2001 20:00:07 -0500 (EST)
- References: <94tmfv$li4@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
"Blimbaum Jerry DLPC" <BlimbaumJE at ncsc.navy.mil> wrote in message
news:94tmfv$li4 at smc.vnet.net...
> I would like to multiply 2 lists together in a certain way...e.g.
>
> Suppose I have 2 lists, L1, L2 (these lists are the output of
> previous calculations):
>
>
> L1 = {a,b}
>
> L2 = { { {f,g,h}, {j,k,l} }, { {m,n,o}, {p,q,r} } }
>
>
> I want to multiply them out in such a way that i get the following
> output:
>
>
> { { {a f, a j }, {b m, b p} } }
>
>
> I have tried MapThread but the the lists are of incompatible size
> and Table..without success...so at this point i'm stuck...
Have you posted a hypothetical example that will be scaled up somehow, or is
this the actual problem? If it is the actual problem, why not just
explicitly combine the desired terms?
In[2]:= L1 = {a,b};
In[3]:= L2 = { { {f,g,h}, {j,k,l} }, { {m,n,o}, {p,q,r} } } ;
In[10]:= {{L1[[1]]L2[[1,1,1]],L1[[1]]L2[[1,2,1]]},{L1[[2]]L2[[2,1,1]],
L1[[2]]L2[[2,2,1]]}}
--
Paul Lutus
www.arachnoid.com
Prev by Date:
RE: Multiply 2 Lists together in a certain way
Next by Date:
Re: Extracting the name of a variable
Previous by thread:
RE: Multiply 2 Lists together in a certain way
Next by thread:
Re: Multiply 2 Lists together in a certain way
|