ploting roots of polynomials



On 27.04.2013 14:48, Gallego Samy wrote:
> Hello,
>
> I would like to plot complex roots of polynomials, I have tried this:
> ------
> a:allroots(x^3+3*x^2+x+1,x);
> plot2d([['discrete, realpart(a), imagpart(a)]], [x,-5,5]);
> ------
> but maxima is not happy because "allroots" output is of the form
> [x=...., x=....,x=] and "plot2d" would like a list of complex (without
> "x=").
>
> Thanks in advance for your help,
>
> Samy
>
>
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
>
  /* remove "z="  from list a */
   a:map('rhs,a);
   a:map('rectform,a);
   a:map('float,a);
   draw2d(


     point_type    = filled_circle,
     points_joined = false,
     point_size    = 0.7,


     point_size    = 1.2,
     key= "critical points",
     color           = blue,
     points(map(realpart,a),map(imagpart,a))

  );


HTH

Adam
http://commons.wikimedia.org/wiki/Category:Images_with_Maxima_CAS_source_code