MathGroup Archive 2001

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

Search the Archive

Re: Multiply 2 Lists together in a certain way

  • To: mathgroup at smc.vnet.net
  • Subject: [mg26939] Re: [mg26931] Multiply 2 Lists together in a certain way
  • From: Andrzej Kozlowski <andrzej at tuins.ac.jp>
  • Date: Sat, 27 Jan 2001 20:00:08 -0500 (EST)
  • Sender: owner-wri-mathgroup at wolfram.com

If the example you sent represents the most general case you need then the
following should work:

{L1*First[Transpose[L2, {2, 3, 1}]]}

-- 
Andrzej Kozlowski
Toyama International University
JAPAN

http://platon.c.u-tokyo.ac.jp/andrzej/
http://sigma.tuins.ac.jp/


on 01.1.27 1:30 PM, Blimbaum Jerry DLPC at BlimbaumJE at ncsc.navy.mil wrote:

> 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...
> 
> thanks....Jerry Blimbaum   NSWC  Panama City, Fl
> 
> 
> 
> 
> 





  • Prev by Date: Re: Any better way for finding frequencies of list entries?
  • Next by Date: RE: Multiply 2 Lists together in a certain way
  • Previous by thread: Re: Multiply 2 Lists together in a certain way
  • Next by thread: RE: Multiply 2 Lists together in a certain way