MathGroup Archive 2009

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

Search the Archive

Re: How to map a list on function

  • To: mathgroup at smc.vnet.net
  • Subject: [mg97522] Re: How to map a list on function
  • From: Bill Rowe <readnews at sbcglobal.net>
  • Date: Sat, 14 Mar 2009 18:13:58 -0500 (EST)

On 3/14/09 at 5:35 AM, manger31 at yahoo.com (buts) wrote:

>I have a long list of integer numbers in groups of four:

>list= {{10,3,5,7},{4,6,8,9},{0,8,3,6}, ...... }

>or its Flatten version.

>How to write a fast function g[list] which does this:

>g[list] =x^10*y^3*z^5*u^7 + x^4*y^6*z^8*u^9 + y^8*z^3*u^6+ ...

In[3]:= list = {{10, 3, 5, 7}, {4, 6, 8, 9}, {0, 8, 3, 6}};
Total@Inner[Power[#2, #1] &, list, {x, y, z, u}, Times]

Out[4]= u^9*x^4*y^6*z^8 + u^7*x^10*y^3*z^5 + u^6*y^8*z^3



  • Prev by Date: Re: Re: Mathematica 7.0.1.0 and some General Comments
  • Next by Date: Trouble with FullSimplify
  • Previous by thread: Re: How to map a list on function
  • Next by thread: Re: How to map a list on function