Subject: plotting the step function through Maxima
From: Jaime Villate
Date: Sat, 03 Nov 2012 12:06:42 +0000
On 11/03/2012 12:24 AM, Fereshteh Zeynivand wrote:
> I need to draw the step function through Maxima. I used this syntax to
> draw the graph of a step function.
>
> y:1-2*unit_step(t-1)+unit_step(t-2);
>
> wxplot2d(y,[t,0,3]);
>
>
> However, it is mathematically wrong. Because it does not meet
> requirements of the function. Could you please guide me to use the
> appropriate syntax?
Hi Fereshteh,
your result is not mathematically wrong. What happens is that an
important part of the plot is being hidden by the boundary box. You have
to enlarge the bounding box, using the option y for plot2d. Since you
have already used y to store an expression, you must use teh syntax y'
to avoid substitution:
plot2d (y, [t,0,3], ['y, -1.5, 1.5]);
Regards,
Jaime