DispG
DelVar
τ
y1,
τ
y2
exp1|y=
τ
y2
→
exp2
exp1|y=
τ
y1
→
exp1
augment(seq(expr("when("&string(exp1|x=xx)&",
τ
y1,0)"),xx,xmin,xmax,„x*res),seq(e
xpr("when("&string(exp2|x=xx)&",
τ
y2,0)"),xx,xmin+„x,xmax,„x*res))
→
tlist
augment(seq(x,x,xmin,xmax,res*„x),seq(x,x,xmin+„x,xmax,res*„x))
→
xlist
For
τ
y1,ymin,ymax,„y*res
τ
y1+„y
→τ
y2
PtOn xlist,tlist
EndFor
DelVar
τ
y1,
τ
y2
EndPrgm
This varies from Andrew's original program only in that the window corner coordinates are passed as
arguments, and the plot resolution can be set as a function argument as well. Specifically:
exp1:
Expression to be plotted
xxmin, xxmax: Minimum and maximum x-coordinates
yymin, yymax: Minimum and maximum y-coordinates
res:
Resolution for both x- and y-axes. res = 1 plots every display point, res = 2
plots every other point, etc.
Either version of the truth plot program can be very slow, especially when every pixel is tested using
res = 1 in truthd(). The 92+ LCD has 24,617 pixels, and the 89 display has 12,243 pixels. truth() is slow
because the function has to be evaluated for each pixel. Setting res = 2 cuts the time in half, and larger
values of res reduce the time even more. This plot is for the function sin(x
2
)/x + cos(y
3
)/y < 0, for x and
y from -2 to 2, with res = 3. This plot finishes in a few minutes.
(Credit to Andrew Cacovean)
[4.4] Plot data and functions simultaneously
I frequently need to plot both data and a function on the same graph. This is useful when curve fitting
and testing interpolation methods. To do this within a program is not difficult, but the method is not
immediately obvious. The program below, plotdemo(), shows one way to do it.
plotdemo(xyspec,xyn,fplot,fpn)
prgm
©Demo program to plot xy-data & 1 function
©24dec99 dburkett@infinet.com
©xyspec: data points matrix or name
4 - 4
Summary of Contents for TI-92+
Page 52: ...Component side of PCB GraphLink I O connector detail 1 41...
Page 53: ...LCD connector detail PCB switch side 1 42...
Page 54: ...Key pad sheet contact side Key pad sheet key side 1 43...
Page 55: ...Key cap detail 1 44...
Page 57: ...Component side of PCB with shield removed A detail view of the intergrated circuits 1 46...
Page 410: ...void extensionroutine2 void Credit to Bhuvanesh Bhatt 10 4...