Le 19-Oct-2001 Gosse Michel écrivait (wrote):
> Hello
>
> I have defined the function :
> f(x):=if x<0 then 0 else 1
> but maxima can't plot this function :
>
> plot2d(f(x),[x,-2,2]);
> returns :
> MACSYMA was unable to evaluate the predicate:
> x < 0
>#0: f(x=x)
> -- an error. Quitting. To debug this try DEBUGMODE(TRUE);)
>
> How can i do ?
The following trick works (delayed evaluation):
(C1) f(x):=if (x>0) then 1.0 else 0.0;
(D1) f(x) := IF x > 0 THEN 1.0 ELSE 0.0
(C2) plot2d('(f(x)),[x,-2,2]);
However, I have another question: there are
many interesting plotting functions descrobed in the file
share/plot2.usg
But there is no plot2.lisp or plot2.lsp or plot2.mc...
For instance paramplot2 would have be another
way to plot the Heaviside function.
Are these functions dead or alive?
Best regards.
P. S. Note about the _very_ small French team
working on maxima : No, folks, you are not alone ;o)
We are with you. But we have a big task to achieve
(the translation) and we are just beginners in
most of maxima and lisp.
----
Daniel Duparc <daniel.duparc@free.fr>
29 av. de la Commune de Paris
94400 Vitry sur Seine (France)