You may want to use RandSeed to reset or initialize the random sequence. Also note that the
randNorm() function returns normally distributed random numbers.
[6.21] Evaluating polynomials
You don't need to explicitly calculate a polynomial like this:
2*x^3 + 3*x^2 + 4*x - 7
→
result
Instead, TI BASIC has a polyEval() function that uses less ROM space:
polyEval({2,3,4,-7},x)
→
result
I don't have any specific timing results, but this method is very fast. You can use this method whenever
you have a sequence of powers of any function. Some examples:
use
polyEval({4,-6,8,-3},
1
/x)
4
x3
−
6
x2
+
8
x
−
3
use
polyEval({4,-6,8,-3},
1
/ln(x))
4
[ln(x)]3
−
6
[ln(x)]2
+
8
ln(x)
−
3
4[sin(x)]
3
- 6[sin(x)]
2
- 3
use
polyEval({4,-6,0,-3},sin(x))
[6.22] Linear Interpolation
Linear interpolation is the least sophisticated, least accurate interpolation method. However, it has the
advantages that it is fast, and often accurate enough if the table values are closely spaced. Given a
table of function values like this:
y2
x2
y
x
y1
x1
where x1, y1, x2 and y2 are given, the problem is to estimate y for some value of x. In general,
y
=
y1
+
(y2
−
y1)
x
−
x1
x2
−
x1
which can be derived by finding the equation for the line that passes through (x1,y1) and (x2,y2).
If you interpolate often, it is worth defining this as a function. At the command line:
define interp(xx
1
,yy
1
,xx2,yy2,x)=yy
1
+(yy2-yy
1
)*((x-xx
1
)/(xx2-xx
1
))
or in the program editor:
interp(xx
1
,yy
1
,xx2,yy2,x)
Func
©Linear interpolation
yy
1
+(yy2-yy
1
)*((x-xx
1
)/(xx2-xx
1
))
EndFunc
6 - 24
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...