Thread View: comp.archives.msdos.d
1 messages
1 total messages
Started by Weiguang Huang
Thu, 20 Jan 1994 04:17
fixing bug of library "plot.(x)" in SymbMath
Author: Weiguang Huang
Date: Thu, 20 Jan 1994 04:17
Date: Thu, 20 Jan 1994 04:17
56 lines
2908 bytes
2908 bytes
The previous library "plot.(x)" in the sm30a.zip has a bug: it did not display graph when you run plot(x^3,x) first time, but it display graph when you run second time. To fix this: move the 5th line of command graph into 2nd line in the library "plot.(x)". Please fix the same problem in the library "dotplot.(x)". Or replace the library "plot.(x)" in sm30a.zip by following: ------------------- # plot y=f(x) on xy-plane # by default xmin:=-5, xmax:=5, ymin:=-5, ymax:=5 # e.g. plot(x^3,x) plot(y_, x_, xmin_, xmax_, ymin_, ymax_) := block(numeric:=on, graph, getmaxy3:=getmaxy-30, getmaxy1:=getmaxy3+1, dx:=(xmax-xmin)/(getmaxx-40), dy:=(ymax-ymin)/getmaxy3, xstep:=dx*10, line(40,getmaxy3,getmaxx,getmaxy3), line(40,0,40,getmaxy3), moveto(0,0), writes(ymax), moveto(0,getmaxy3), writes(ymin), moveto(40,getmaxy-20), writes(xmin), moveto(getmaxx-30,getmaxy-20), writes(xmax), setviewport(40,0,getmaxx,getmaxy3,1), moveto(0,getmaxy3), do( lineto((x-xmin)/dx,getmaxy1-(y-ymin)/dy), x,xmin,xmax,xstep), numeric:=off, readchar, text, local(dx,dy,xstep)) plot(y_, x_, xmin_, xmax_) := plot(y,x,xmin,xmax,-5,5) plot(y_, x_) := plot(y,x,-5,5,-5,5) ************************************************************************* * Dr. Weiguang Huang * * Dept. of Analytical Chemistry * * University of New South Wales * * Kensington, Sydney, NSW 2033 * * Australia * * * * phone: 61-2-697-4643, fax: 61-2-662-2835 * * email: w.huang@unsw.edu.au, s9300078@cumulus.csd.unsw.oz.au * ************************************************************************* * SymbMath: Symbolic Math software * * avail by ftp oak.oakland.edu in pub/msdos/calculator as sm30a.zip * * or by sending the following email * * /pdget mail pd:<msdos.calculator>sm30a.zip * * to listserv@vm1.nodak.edu, or listserv@ndsuvm1.bitnet * *************************************************************************
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads