Convert Polynomial to Vector



If speed is any issue, change the polynomial p   by  p:rat(r)    and use ratcoef.
RJF

----- Original Message -----
From: Daniel Lakeland <dlakelan at street-artists.org>
Date: Tuesday, August 7, 2007 2:50 pm
Subject: Re: [Maxima] Convert Polynomial to Vector

> On Tue, Jul 31, 2007 at 01:19:17PM -0400, Bartlett, Charles S. wrote:
> > How can I convert a polynomial to a vector in Maxima? i.e. the 
> vector> contains the coefficients of the polynomial.
> 
> example:
> 
> (%i1) 1+x+x^2-x^3;
>                                  3    2
> (%o1)                          - x  + x  + x + 1
> (%i2) makelist(coeff(%,x,i),i,0,hipow(%,x));
> (%o2)                           [1, 1, 1, - 1]
> 
> 
> 
> -- 
> Daniel Lakeland
> dlakelan at street-artists.org
> http://www.street-artists.org/~dlakelan
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
>