Services & Resources / Wolfram Forums
MathGroup Archive
*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
  • Subject: [mg44733] Re: [mg44726] Conversion Function -> List
  • From: "Mihajlo Vanevic" <mvanevic at>
  • Date: Mon, 24 Nov 2003 00:05:21 -0500 (EST)
  • Sender: owner-wri-mathgroup at

Use this simple conversion rule:
(notice that rule applies from left to right)

conv = {Plus -> List, Times -> List};

x y + Sin[x] Cos[y] /. conv

{{x, y}, {Cos[y], Sin[x]}}

Sum[p[i, x] q[i, y], {i, 1, 5}] /. conv

{{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]}}

         Mihajlo Vanevic

*    At 2003-11-22, 02:17:00 
*        Vadim Zelenkov, zelenkov at  wrote:
>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!
>P.S, If possible please duplicate your answers to zelenkov[at]

  • Prev by Date: Re: Conversion Function -> List
  • Next by Date: Re: Calling Mathematica via MathLink multiple times
  • Previous by thread: RE: Conversion Function -> List
  • Next by thread: Re: Conversion Function -> List