Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!clyde!rutgers!nysernic!itsgw!leah!rmb384 From: rmb384@leah.UUCP Newsgroups: comp.sys.tandy Subject: Model 100 graphing utility Message-ID: <516@leah.Albany.Edu> Date: Sat, 3-Oct-87 02:05:54 EDT Article-I.D.: leah.516 Posted: Sat Oct 3 02:05:54 1987 Date-Received: Sun, 4-Oct-87 02:22:10 EDT Organization: The University at Albany, Computer Services Center Lines: 70 Enclosed is a nifty graphing utility A freind of mine and i wrote to help me get through Calc last year. It will draw a graph of a function which it prompts you for. It then asks for the range. Kinda fun. You can type the funtion in like so: Computer: y= you type: sin(x^(cos(x))) Computer: From A= you: 0 Computer: To B=? you: 4 And it scales and draws the graph. Have Fun and enjoy.... ---------------------------- Cut Here --------------------------- 1 ' (c) + 1987 R.M. Bownes & L.B. Fulton 2 ' This program may be copied,modified, 3 ' and distributed so long as this 4 ' notice is kept intact. Please inform 5 ' the authors of any nift changes. 6 N=64:DIM DP(66),DS(66) 20 GOSUB 1000 30 GOSUB 2000 40 GOSUB 3000 50 GOSUB 4000 60 A$=INKEY$:IF A$="" THEN 60 70 IF A$="Q" OR A$="q" THEN MENU 80 RUN 1000 'input section 1010 CLS:PRINT " Model 100 Whiz-bang Graphing Program"; 1020 PRINT @80,"Please input function of the form" 1030 PRINT " y=F(x)" 1040 LINE INPUT "y=";FX$ 1050 PRINT @200,"From A=";:INPUT A 1060 PRINT @220,"To B=";:INPUT B 1070 PRINT " Please Wait"; 1080 RETURN 2000 'Calculation routine 2010 HIGH=-10000:LOW=10000 2015 IN=(B-A)/N 2020 F$="DP(INT((X-A)/IN))="+FX$+CHR$(0) 2500 A0=VARPTR(F$) 2510 A1=PEEK(A0+1)+256*PEEK(A0+2) 2520 CALL 1606,0,A1 2530 ' 2540 FOR X=A TO B STEP IN 2550 CALL 2499,0,63105 2560 NEXT X 2570 FOR I=0 TO N 2580 IF DP(I)>HIGH THEN HIGH=DP(I) 2590 IF DP(I)