Hi John,
> When I use ?truncate in a function, and then try to plot the function I
> get an error, e.g.
>
> f(t):=?truncate(t)
> plot2d([f(t)],[t,-5.0,5.0])$
Steer away from ?truncate -- it is a Lisp function which
doesn't know about Maxima expressions. (The documentation
should be updated to reflect this, sorry.) So you run into
unpleasant surprises --
?truncate (1.5); => 1 OK
?truncate (3); => 3 OK
?truncate (7/5); => error, rats!
Try floor and ceiling instead. Maxima knows some math
properties of these. These functions are in Maxima 5.9.3.
f (t) := floor (t);
plot2d (f (t), [t, -5, 5]); => nice plot
If you don't have 5.9.3 I recommend it. Get it from
http://sourceforge.net/projects/maxima .
HTH
Robert Dodier