EasyManua.ls Logo

Texas Instruments TI-92+

Texas Instruments TI-92+
507 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
This program, scatterf(), draws this type of scatter plot.
scatterf(f,x,xl,xh,yl,yh,n)
Prgm
©("f(var)","var",xmin,xmax,ymin,ymax,its)
©Function scatterplot with random points
©13aug01 dburkett@infinet.com
local k,e
falsee
©Clear graph screen
clrgraph
clrdraw
plotsoff
fnoff
clrio
©Set x- & y-axis ranges
xlxmin
xhxmax
ylymin
yhymax
©Loop to plot the function points
for k,1,n
if getkey()0:exit
(xh-xl)*rand()+xlxn
expr(f&"|"&x&"="&format(xn,"S12"))yn
if yn<ymin or yn>ymax then
truee
pxltext "range error",0,0
disp "Range error: "&string(yn)
else
pton xn,yn
endif
endfor
©Delete global variables
delvar xn,yn
©Display range errors on prgm I/O screen
if e:disp
EndPrgm
The input arguments are
The number of points to plotn
The y-axis maximumyh
The y-axis minimumyl
The x-axis maximumxh
The x-axis minimumxl
The name of the independent variable, passed as a string.x
The name of the function to plot, passed as a string. f
4 - 17

Table of Contents

Related product manuals