where m is the number of coefficients in the equation. For the simple linear equation y = ax + b, m = 2,
because we have two coefficients a and b.
It is appropriate to use r
2
without DOF adjustment when the data to be fit has no experimental errors.
For example, this is the case if you are fitting a curve to data generated by some other mathematical
function. However, the DOF adjusted r
2
should be used when the y-data values include experimental
error.
[6.14] Use norm() to find root mean square (RMS) statistic for matrices
The root mean square statistic is used in statistics. I prefer to use it over other statistics for comparing
curve fits and interpolation errors. RMS is defined as
RMS
=
1
n
✟
i
=
1
n
xi
2
The 89/92+ norm() function is very close to this:
norm
([
a, b, c, ...
]) =
a2
+
b 2
+
c 2
+
...
so we can rewrite the RMS equation and use the norm() function to find RMS:
RMS
=
1
n
[norm(dmatrix)]
where dmatrix is the matrix of data values, and n is the size of the matrix. This function performs the
calculation:
rms(m)
func
if gettype(m)="LIST":list
▶
mat(m)
→
m
norm(m)/(
√
(max(dim(m))))
Endfunc
The input variable m may be a list or a matrix. If m is a matrix, it may be either a single-row or a
single-column matrix. This is handled by using the maximum value returned by dim() as the value of n.
[6.15] Convert equations between rectangular and polar coordinates
It can be useful to convert equations between polar and rectangular coordinates, and the 89/92+ have
functions that make this particularly easy. These two programs, by Alex Astashyn, perform the
conversion. p2c() converts from polar to rectangular, and c2p() converts from rectangular to polar.
c2p(eq)
func
©Convert 'eq' in rectangular coordinates x,y to polar coordinates r,
θ
solve(eq,r)|x=P
▶
Rx(r,
θ
) and y=P
▶
Ry(r,
θ
)
EndFunc
p2c(eq)
Func
©Convert 'eq' in polar coordinates r,
θ
to
rectangular coordinates x,y.
solve(eq,y)|
θ
=R
▶
P
θ
(x,y) and r=R
▶
Pr(x,y)
EndFunc
6 - 19
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...