plotting



I defined a function as follows:

cheby(n) := block([term : 0], for i thru n
              do if primep(i) then term : log(i) + term, return(term));

Then I want to make some plot:
plot2d(cheby, [x,2,10]); 
everything OK.

If I write the statement as follows I got:

(%i5) plot2d(cheby(x),[x,2,10]);
Maxima was unable to evaluate the predicate:
1 > x
#0: cheby(n=x)
 -- an error.  To debug this try debugmode(true);



just try plot2d('cheby(x),[x,2,10])

in order to maxima don't evaluate cheby(x) use 'cheby(x)


       
---------------------------------

S? un Mejor Amante del Cine
?Quieres saber c?mo? ?Deja que otras personas te ayuden!.