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);
If I use some other, similar, function, ie:
fu(x) := block([z], z: log(x), return(z));
everything is OK with both plot-statements.
plot2d(fu,[x,1,5]) and plot2d(fu(x), [x,1,5]);
Help and many thanks for some enlightment.
Wiel.