Article View: comp.archives.msdos.d
Article #603fixing bug of library "plot.(x)" in SymbMath
From: 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 * *************************************************************************
Technical Details
Message-ID:
<1994Jan20.041731.28947@usage.csd.unsw.OZ.AU>Path:
arc1-ca.pugleaf.net!gmd.de!xlink.net!howland.reston.ans.net!agate!msuinfo!harbinger.cc.monash.edu.au!yarrina.connect.com.au!sserve!usage!newsShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10d683,9f8b1937bf66f9e9,start X-Google-Attributes: gid10d683,public X-Google-Thread: 111d31,9f8b1937bf66f9e9,start X-Google-Attributes: gid111d31,public X-Google-Thread: 14a7f9,9f8b1937bf66f9e9,start X-Google-Attributes: gid14a7f9,public X-Google-ArrivalTime: 1994-01-20 07:16:17 PST Newsgroups: comp.archives.msdos.d,comp.binaries.ibm.pc.d,aus.computers.ibm-pc Path: arc1-ca.pugleaf.net!gmd.de!xlink.net!howland.reston.ans.net!agate!msuinfo!harbinger.cc.monash.edu.au!yarrina.connect.com.au!sserve!usage!news From: s9300078@cumulus.csd.unsw.OZ.AU (Weiguang Huang) Subject: fixing bug of library "plot.(x)" in SymbMath Message-ID: <1994Jan20.041731.28947@usage.csd.unsw.OZ.AU> Sender: news@usage.csd.unsw.OZ.AU Nntp-Posting-Host: aix00.csd.unsw.oz.au Organization: University of New South Wales Date: Thu, 20 Jan 1994 04:17:31 GMT Lines: 57