signum-plot



dear Jose,

hm, I'm surprised. I use wxMaxima 5.14 and I _see_ the plot in an extra gnuplot-window.
Please try an inline plot (if using wxMaxima):

(%i21) wxplot2d( [signum(f(x))], [x,-4,4], [y,-4,4] );

Please observe the command syntax: wxplot2d instead of plot2d.

You can also try Mario's draw package and say:

load("draw");
draw2d( explicit( signum(x^3), x,-4,4, y,-2,+2) )

If you read the help file about 'draw' you will find many options to enhance your plots.
Enjoy.

HTH Wolfgang


"J. Simons" <simons17 at xs4all.nl> schrieb:
> Dear Wolfgang,
> 
> Thanks for your answer.
> It's true, I get a plot with your solution, but unfortunately it's an empty 
> plot !
> Maxima has no problems with calculating signum(f(x)) :
> (%i16) f(x):=x^3;
> (%o16) f(x):=x^3
> (%i18) signum(f(-2));
> (%o18) -1
> (%i19) signum(f(0));
> (%o19) 0
> (%i20) signum(f(1));
> (%o20) 1
> But Maxima fails in plotting signum(f(x))  through
> (%i21) plot2d([signum(f(x))],[x,-4,4],[y,-4,4]);
> This command produces an empty gnuplot graph !?
> 
> Regards,
> 
> Jos?
> 
> ----- Original Message ----- 
> From: "Wolfgang Lindner" <LindnerW at t-online.de>
> To: "J. Simons" <simons17 at xs4all.nl>
> Cc: "maxima-help" <maxima at math.utexas.edu>
> Sent: Sunday, December 30, 2007 10:03 AM
> Subject: Re: [Maxima] signum-plot
> 
> 
>   "J. Simons" <simons17 at xs4all.nl> schrieb:
> > L.S., I tried to plot a signumfunction in the following way :
> > (%i36) f(x):=x^3;
> > (%o36) f(x):=x^3
> > (%i37) plot2d(signum(f(x)),[x,-4,4]);
> > But I got no plot at all ? Thanks in advance for your answer/help. Jos? 
> > Simons
> 
> Dear Jose,
> 
> try
> 
>        plot2d( [signum(f(x))] , [x,-4,4], [y,-4,4] );
> 
> 
> Best Wolfgang