MathGroup Archive 2001

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

Search the Archive

Re: Raise lists of a list to powers

  • To: mathgroup at smc.vnet.net
  • Subject: [mg27113] Re: [mg27079] Raise lists of a list to powers
  • From: Tomas Garza <tgarza01 at prodigy.net.mx>
  • Date: Sun, 4 Feb 2001 02:58:42 -0500 (EST)
  • References: <200102030959.EAA08599@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

I guess this solves your problem:

In[1]:=
list1 = {{a, b, c}, {d, e, f}, {g, h, i}, {j, k, l}, {m, n, o}};
In[2]:=
expon = {r, s, t};
In[3]:=
list2 = Transpose[Plus[list1, 1]]
Out[3]=
{{1 + a, 1 + d, 1 + g, 1 + j, 1 + m}, {1 + b, 1 + e, 1 + h, 1 + k,
    1 + n}, {1 + c, 1 + f, 1 + i, 1 + l, 1 + o}}
In[4]:=
MapThread[Power, {list2, expon}] // Transpose
Out[4]=
{{(1 + a)^r, (1 + b)^s, (1 + c)^t},
  {(1 + d)^r, (1 + e)^s, (1 + f)^t},
  {(1 + g)^r, (1 + h)^s, (1 + i)^t},
  {(1 + j)^r, (1 + k)^s, (1 + l)^t},
  {(1 + m)^r, (1 + n)^s, (1 + o)^t}}

Tomas Garza
Mexico City

----- Original Message -----
From: <Matthias.Bode at oppenheim.de>
To: mathgroup at smc.vnet.net
Subject: [mg27113] [mg27079] Raise lists of a list to powers


> Dear Colleagues,
>
> I have a list of lists
>
> {{a, b, c}, {d, e, f}, {g, h, i}, ...}.
>
> 1. To each value 1 has to be added. (I can do that.)
>
> 2. The new values (a+1, b+1, ...) have to be raised to a series of powers:
>
> a, d, g have to be raised to r;
> b, e, h have to be raised to s
> and c, f, i to t.
>
> There is no function governing the exponents r, s, t; they are just a list
> of values like -(1/256) or -(1/12).
>
> Map, Thread, Apply &c. so far knew to thwart my efforts most effectively.
>
> Thank you very much for your help.
>
> Matthias Bode
> Sal. Oppenheim jr. & Cie. KGaA
> Koenigsberger Strasse 29
> D-60487 Frankfurt am Main
> GERMANY
> Tel.: +49(0)69 71 34 53 80
> Mobile: +49(0)172 6 74 95 77
> Fax: +49(0)69 71 34 6380
> E-mail: matthias.bode at oppenheim.de
> Internet: http://www.oppenheim.de
>
>
>



  • Prev by Date: RE: Parametric Plot
  • Next by Date: AW: Contour Plot
  • Previous by thread: Re: Raise lists of a list to powers
  • Next by thread: Re: Raise lists of a list to powers