Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2003
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2003

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

Search the Archive

RE: Conversion Function -> List

  • To: mathgroup at smc.vnet.net
  • Subject: [mg44732] RE: [mg44726] Conversion Function -> List
  • From: "Sorasak" <kieng at cox.net>
  • Date: Mon, 24 Nov 2003 00:05:20 -0500 (EST)
  • Sender: owner-wri-mathgroup at wolfram.com

Here is what you are looking for.

In[4]:=
Partition[Level[x y + Sin[x] Cos[y],{2}],2]

Out[4]=
{{x,y},{Cos[y],Sin[x]}}

In[8]:=
Partition[Level[Sum[p[i,x]  q[i,y],{i,1,10}],{2}],2]

Out[8]=
{{p[1,x],q[1,y]},{p[2,x],q[2,y]},{p[3,x],q[3,y]},{p[4,x],q[4,y]},{
  p[5,x],q[5,y]},{p[6,x],q[6,y]},{p[7,x],q[7,y]},{p[8,x],q[8,y]},{
  p[9,x],q[9,y]},{p[10,x],q[10,y]}}

Enjoy the power of mathematica
Sorasak

-----Original Message-----
From: Vadim Zelenkov [mailto:zelenkov at mail333.com] 
To: mathgroup at smc.vnet.net
Subject: [mg44732] [mg44726] Conversion Function -> List

Hello!

Given a function
    x y + Sin[x] Cos[y]

I need to convert it into the list
    {{x,y},{Sin[x],Cos[x]}}

Generally, the purpose to convert a function
    Sum[p[i,x] q[i[y], {i,1,n}]

into the list
    {{p[1,x],q[1,y]},...,{p[n,x],q[n,y]}

How to do it using Mathematica?

Thanks in advance!

V.Z.

P.S, If possible please duplicate your answers to zelenkov[at]mail333.com


  • Prev by Date: Re: Conversion Function -> List
  • Next by Date: Re: Conversion Function -> List
  • Previous by thread: Re: Conversion Function -> List
  • Next by thread: Re: Conversion Function -> List