Mathematica 9 is now available
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: [mg44734] Re: Conversion Function -> List
  • From: bobhanlon at aol.com (Bob Hanlon)
  • Date: Mon, 24 Nov 2003 00:05:21 -0500 (EST)
  • References: <bpn3e7$ljo$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Here are a few ways

(List@@#)&  /@ (List @@ expr)

expr /. {Plus->List, Times->List}

Cases[expr, (f_)[x__] -> {x}]


Bob Hanlon

In article <bpn3e7$ljo$1 at smc.vnet.net>, zelenkov at mail333.com (Vadim Zelenkov)
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?


  • Prev by Date: How to get single letters bold instead italic
  • Next by Date: Re: solution of linear equations, please help!!
  • Previous by thread: Re: Conversion Function -> List
  • Next by thread: Re: Conversion Function -> List