**TI92P*main?G6&7CW'K5G?G?G V%7C1RscatterfZ(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 ynymax 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܀