Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2006
*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 2006

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

Search the Archive

Re: Converting an expression to a list of terms?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg71513] Re: Converting an expression to a list of terms?
  • From: Jon Harrop <jon at ffconsultancy.com>
  • Date: Tue, 21 Nov 2006 07:05:10 -0500 (EST)
  • Organization: Flying Frog Consultancy Ltd.
  • References: <200611200743.CAA09240@smc.vnet.net> <ejtdhl$j0v$1@smc.vnet.net>

János wrote:
>>    A + B - C + . . .

The FullForm view of that is:

In[1]:= A + B - C // FullForm

Out[1]//FullForm= Plus[A, B, Times[-1, C]]

So you just want to replace the Plus with List:

In[2]:= List @@ (A + B - C)

Out[2]= {A, B, -C}

-- 
Dr Jon D Harrop, Flying Frog Consultancy
Objective CAML for Scientists
http://www.ffconsultancy.com/products/ocaml_for_scientists


  • Prev by Date: Re: General--Trigonometric functions manipulations in Mathematica
  • Next by Date: number not fitting in
  • Previous by thread: Re: Converting an expression to a list of terms?
  • Next by thread: Re: Converting an expression to a list of terms?