On 3/30/07, Stavros Macrakis <macrakis at alum.mit.edu> wrote:
> diagram(m) :=
> block ( [lam, alpha, N:30],
> lam:float(m^2*%pi^2),
> diag_points:[[lam,0]],
> for i thru N-1 do (
> alpha:float(i/N*%pi),
> lam:newton(lam,alpha),
> diag_points: cons([lam,alpha], diag_points) ),
> plot2d(diag_points))$
The program as shown in the previous message from Stavros
runs successfully and seems to yield some useful output.
The only change at this point is that the final line should be
plot2d([discrete, diag_points]), otherwise plot2d complains.
A couple of notes. (1) My advice is to return the computed
points instead of plotting them within diagram. Then you
have more flexibility about what to do with them.
(2) There is a function find_root in Maxima which might
replace newton here. It is an interpolation method so it
might be more likely to succeed. For example, for m=2
newton appears to iterate indefinitely. find_root was
named interpolate in Maxima versions before 5.11.0.
Hope this helps
Robert Dodier