MathGroup Archive 2007

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

Search the Archive

Re: Polynomial to List

  • To: mathgroup at smc.vnet.net
  • Subject: [mg76963] Re: Polynomial to List
  • From: dh <dh at metrohm.ch>
  • Date: Thu, 31 May 2007 03:12:37 -0400 (EDT)
  • References: <f3grip$49r$1@smc.vnet.net>


Hi Nick,

consider the full form of your expression poly=1 + x + x^2 + x^3 + x^4:

FullForm[poly]

this nearly looks like the list you want (besides reversion), only the 

Head is Plus instead of List. But this is easily fixed by Apply:

List @@ poly

If you want to reverse the list, you may use Reverse.

hope this helps, Daniel



Nick Hoffman wrote:

> I have a polynomial,

> Lets say:

> 

> 1 + x + x^2 + x^3 + x^4

> 

> 

> and all I need to do is get that into a list of this form

> 

> {x^4, x^3, x^2, x, 1}

> 

> Any help would be greatly appreciated!  Thanks!

> 

> 




  • Prev by Date: Re: Integer Solutions
  • Next by Date: notebookcreate
  • Previous by thread: Re: Polynomial to List
  • Next by thread: upcoming book for Mathematica 6!