Вы находитесь на странице: 1из 6

TI 89 Titanium Exercises - Part 8

A list is a collection of objects enclosed between braces [ { ] [ } ], and separated by commas.

Operations with lists of integer numbers and fractions


1) Create a sub-directory called ‘INTL’ (INTegers Lists). Within that directory, create and store
the following lists of numbers with the calculator in EXACT or AUTO mode:

L01 = {5, 2, 3, 4, -1} L02 = {-3, 5, -2, 4} L03 = {1, -5, 2, 0}


L04 = {π/6, π/3, 2∗π/3, 5∗π/6} L05 = {30, 60, 120, 150} L06 = {1,2,3,4,5,6}

Notice that all the numbers involved are integers or integer fractions of π. (Later on, we will
try lists of real numbers).

2) Try the following operations using the lists entered above:

(1) L02 + L03 (2) L02 - L03 (3) L02*L03 (4) L03/L02 (5) LO2/L03
(6) L02^L03 (7) L02^2 (8) L02 - 1.5 (9) L02 - L03 (10) 2*L03
(11) L02/5

3) Try the following functions applied to lists

(1) ABS(L02) (2) ABS(L02) ADD L03 (3) SIN(L04), use RAD (4) COS(L05), use DEG
(5) TAN(2*L02), use DEG(6) ASIN(L02/10) (7) ACOS(L03/10) (8) ATAN(L03)
(9) EXP(L03) (10) LN(ABS(L02)) (11) 10^L02 (12) LOG(ABS(L03))
(13) √(ABS(L03)) (14) SINH(L02) (15) COSH(L03) (16) TANH(L02)
(17) ASINH(L03) (18) ACOSH(L02) (19) ATANH(L03) (20) MIN(L02,L03)
(21) MAX(L02,L03) (22) MOD(L02,L03) (23) MOD(L03,L02) (24) SIGN(L02)

Operations with lists of real numbers and fractions


4) Create a sub-directory called ‘REALL’ (REAL number Lists). Within this sub-directory, create
and store the following lists of numbers with the calculator in EXACT or AUTO mode. Make
sure that numbers that are integers include the decimal point when you write them, so that
they will be stored as real numbers.

L01 = {5., 2., 3., 4., -1.} L02 = {-3., 5., -2., 4.} L03 = {1., -5., 2., 0.}
L04 = {π/6., π/3., 2.∗π/3., 5.∗π/6.} L05 = {30., 60., 120., 150.} L06 = {2.5, 3.2, 4.8, 1.9}
L07 = {2.2, 1.7, 0.5, 3.8}

5) Try the following operations using the lists entered above:

(1) L02 + L03 (2) L02 - L03 (3) L02*L03 (4) L03/L02 (5) LO2/L03
(6) L02^L03 (7) L02^2 (8) L02 - 1.5 (9) L02 - L03 (10) 2*L03
(11) L02/5

6) Try the following functions applied to lists

(1) ABS(L02) (2) ABS(L02) ADD L03 (3) SIN(L04), RAD (4) COS(L05), DEG
(5) TAN(2*L02), DEG (6) ASIN(L02/10) (7) ACOS(L03/10) (8) ATAN(L03)
(9) EXP(L03) (10) LN(ABS(L02)) (11) 10^L02 (12) LOG(ABS(L03))
(13) √(ABS(L03)) (14) SINH(L02) (15) COSH(L03) (16) TANH(L02)
(17) ASINH(L03) (18) ACOSH(L02) (19) ATANH(L03) (20) MIN(L02,L03)
(21) MAX(L02,L03) (22) L02 MOD L03 (23) L03 MOD L02 (24) SIGN(L02)
(25) MANT(L06) (26) XPON(L07) (27) IP(L06) (28) FP(L07)
(29) RND(L07,0) (30) TRNC(L07,0) (31) FLOOR(L06) (32) CEIL(L07)

Page 8-1
(33) DÆR(L04) (34) RÆD(L05) (35) GAMMA(L06) (36) Psi(L07)
(37) PSI(L07,{1,2,3,4})

Lists of complex numbers


7) Within sub-directory REAL, create and store the following lists of complex numbers

(1) LC1 = L02 + i*L03 (2) LC2 = L06 ADD i*L07

8) Perform the following operations on the lists of complex numbers created above:

(1) LC1 ADD LC2 (2) LC1 - LC2 (3) LC1*LC2


(4) LC1/LC2 (5) LC1^2 (6) √LC2

9) Apply the following functions to the lists of complex numbers created above:

(1) ABS(LC1) (2) ARG(LC2) (3) SIGN(LC1) (4) RE(LC2)


(5) IM(LC1) (6) CONJ(LC2) (7) NEG(L02)

10) Apply the following functions to selected lists of real numbers so that the results are
complex numbers:

(1) L02 (2) ASIN(L03) (3) ACOS(L02) (4) LN(L03)


(5) LOG(L02)

Functions in the MATH/List sub-menu


To activate the MATH/List sub-menu use [2nd][5] (i.e., MATH), and select 3:List. The functions
available are:

1:seq: produce a sequence of number according to a rule


2:min: find the minimum value in a list
3:max: find the maximum value in a list
4:SortA: sort list in Ascending order (*)
5:SortD: sort list in Descending order (*)
6:sum: add all elements in a list
7:cumSum: a list representing the cumulative sum of the list
8:product: multiply all elements in a list
9:left: extract sub-list on the left side of current list
A:mid: extract sub-list in the middle of current list
B:right: extract sub-list on the right side of current list
C:ΔList: a list representing the increments of consecutive elements
D:polyEval: evaluate a polynomial whose coefficients are elements in list
E:listfmat: convert list to a matrix
F:matflist: convert matrix to a list

(*) replaces existing list if the argument is a variable storing a list

11) Apply the following functions to lists, use either the lists in INTL or in REALL:

(1) seq(2*k+1,k,1,5) Note: this command creates a list of elements xk = 2k+1, for k = 1, 2, …, 5
(2) seq(k^2,k,1,11,2) Note: list of elements xk = k2, for k = 1, 3, 5, …, 11
(3) min(L01) (4) max(L04) (5) SortA(L01) (6) SortD(L04)
(7) sum(L02) (8) cumSum(L03) (9) product(L01)
Note: left(L,k) produces a list of the first k elements of L
(10) left(L01,1) (11) left(L01,2)
Note: mid(L,j,k) produces a list of the elements j, j+1, …, k of list L.

Page 8-2
Note: to extract element j of list L, use mid(L,j,j)
(12) mid(L01,2,4) (13a) mid(L01,2,3) (13b) mid(L01,3,3
Note: right(L,k) produces a list of the last k elements of L
(14) right(L01,2) (15) right(L01,1)
(16) ΔList(L01) (17) ΔList(L02)
Note: polyEval(L,x) evaluates the polynomial a1xk-1 + a2xk-2 + …+ ak-1x + ak whose coefficients
are the list L = { a1, a2, …, ak-1,ak } at the value x
(18) polyEval(L01,x) (19) polyEval(L01,-2) (20) polyEval(L01,x) | x=-2
Note: listfmat(L,k) converts a list L into a matrix of k columns, filling the matrix elements by
rows. If there are not enough elements to fill the available rows, the matrix is filled with zeros.
(21) listfmat(L02,2) (22) listfmat(L02,3) (23) listfmat(L06,2)
(24) listfmat(L06,3) (25) listfmat(L06,4)
Note: matflist(M) converts a matrix M, of n rows and m columns, into a list of nxm elements,
filling the list by rows
(26) matflist([[1,2,3,4],[5,6,0,0]])
(27) matflist ([[1,2],[3,4]])

Functions in the MATH/Matrix sub-menu


Some functions within the MATH/Matrix sub-menu can be applied to lists. To activate this
menu use: [2nd][5] (i.e., MATH), then select 4:Matrix. The functions of interest are:

7:augment: concatenates two lists


I: Dimensions:
dim: determines the size of a list
L: Vector ops:
crossP: cross product of two lists used as vectors
dotP: dot product of two lists used as vectors

Exercises:
(1) augment(L01,L02) (2) augment(L02,L03) (3) augment(L01,L03)
(4) dim(L01) (5) dim(L03) (6) dim(L05)
(7) crossP({1,-2,5},{3,-1,2}) (8) crossP({3,2},{1,5}) (9) dotP(({1,-2,5},{3,-1,2})
(10) dotP({3,2},{1,5})

Lists can be function arguments


Define the following function using Define ([F4], select 1: Define):

(1) f(x) = exp(x+1), evaluate f(L01), f(L02), f(L06), f(L07)


(2) g(x,y) = (x+1)*(y-1), evaluate f(L01,L02), f(L06,L07)
(3) h(r,s) = exp(r+s)/ln(s+1), evaluate h(L01,L02), h(L06,L07)

Applications of lists
Lists calculations can be applied to the calculation of statistical quantities, if the list represent
a numerical sample of data, for example:

(1) Arithmetic, geometric and harmonic means.


The arithmetic mean of a list X = {x1, x2, …, xn} is defined as

1 n
x= ∑ xi
n i =1

The geometric mean of a list X = {x1, x2, …, xn} is defined as

x g = n x1 ⋅ x 2 ⋅ " ⋅ x n

Page 8-3
The harmonic mean of a list X = {x1, x2, …, xn} is defined as:

1
xh = n
1 1

n i =1 xi

Using lists to calculate these quantities:

• Arithmetic mean: sum(X)/dim(X)


• Geometric mean: (product(X))^(1/dim(X))
• Harmonic mean: (sum(X^(-1))/dim(X))^(-1)

Determine the arithmetic, geometric, and the harmonic means of the following list of
data values: { 1.25, 1.85, 1.02, 1.75, 1.35, 1.22, 1. 45, 1.68, 1.72, 1.25, 1.22}

(2) Variance. The variance of a list {x1, x2, …, xn} is defined as


1 n
s x2 = ∑ ( xi − x ) 2 ,
n − 1 i =1

To calculate the variance, first store the arithmetic mean into a variable, say, m. Use
the following:

• Store list in X
• Store sum(X)/dim(X) in m
• Calculate the variance: sum((X – m)^2)/(dim(X)-1)

(3) Weighted average.


Given a list X= {x1, x2, …, xn} with associated weights W = {w1, w2, …, wn}, the weighted
average of the list X is defined as

∑x i ⋅ wi
xw = i =1
n
.
∑w
i =1
i

This can be implemented as: sum(X*W)/sum(W)

Calculate the weighted average of a list of numbers

x = { 0.5, 1.5, 1.2, 1.3, 1.7, 1.8, 1.2},


with weights
w = {2, 3, 3, 1, 2, 3, 4}.

(4) One-dimensional center of mass. Given a list of point masses m = {m1, m2, …, mn}
located at positions x = {x1, x2, …, xn} along a line, the location of the center of mass of
this collection of masses is given by

Page 8-4
n

∑x i ⋅ mi
xcm = i =1
n
.
∑m
i =1
i

This formula essentially describes a weighted average of the masses, mi, with the
weights being the locations of the masses, xi. Determine the location of the center of
mass, xcm, for the following mass configuration:

(5) Two-dimensional center of mass. A two dimensional distribution of point masses can
be described by a list of masses m = {m1, m2, …, mn} located at points P = { (x1,y1),
(x2,y2) …, (xn,yn) } on the x-y plane. The center of mass of this collection of masses is
the point Pcm(xcm,ycm) with
n n

∑x i ⋅ mi ∑y i ⋅ mi
xcm = i =1
n
, y cm = i =1
n
.
∑m
i =1
i ∑m
i =1
i

Determine the coordinates of the center of mass of the following two-dimensional mass
configuration:

Page 8-5
(6) Grouped data.
Grouped data is the result of a frequency distribution from a large data sample. An
example is shown below. If X = {x1, x2, …, xn} represent the class mark of the classes,
and their associated frequencies are F = {f1, f2, …, fn}, the mean of the data is defined
as

∑x i ⋅ fi
x= i =1
n
.
∑f
i =1
i

The variance of the data is defined as:

n
n
s2 = ⋅ ∑ ( xi − x ) 2 ⋅ f i
⎛ 2 n 2⎞
⎜ n − ∑ fi ⎟
i =1

⎝ i =1 ⎠
The standard deviation is the square root of the variance.

Using lists, we can calculate the mean, variance, and standard deviation of grouped
data as follows:

• Store lists X and F


• The mean is: sum(X*F)/sum(F)
• Store the mean into variable m
• The variance is: (dim(X)/(dim(X)^2-sum(F^2))*sum((X-m)^2*F)
• Calculate the square root of the variance

The following table shows the grouped data of concrete density (kg/m3) obtained from
a frequency distribution of density data.

Class Class Frequency


Number mark count
1 2405 12
2 2415 18
3 2425 23
4 2435 25
5 2445 32
6 2455 22
7 2465 18
8 2475 12
9 2485 8
10 2495 4

Calculate (a) the mean value, (b) the variance, and (c) the standard deviation (square
root of the variance), of the grouped data shown.

Page 8-6

Вам также может понравиться