EasyManuals Logo
Home>Texas Instruments>Calculator>TI-89

Texas Instruments TI-89 Tip List

Texas Instruments TI-89
507 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #88 background imageLoading...
Page #88 background image
[3.10] Appending is faster than augment() for adding elements to lists; seq() is even faster
Frank Westlake says that:
When working with lists it can be much quicker to append rather than to augment new values. The
append operation continues at the same rate, regardless of the size of the list, but the augment
operation continues to decrease speed as the list grows in size. For example:
apnd()
prgm
local i,list
{}list
for i,1,100
disp i
ilist[i]
endfor
disp list
endprgm
is much quicker than
agmnt()
prgm
local i,list
{}list
for i,1,100
disp i
augment(list,{i})list
endfor
disp list
endprgm
The apnd() program executes in about 9.8 seconds, and the agmnt() program finishes in about 17.9
seconds.
However, if your list element expression is simple enough to be used in the seq() function, this is much
faster than either augment() or appending. This function:
seq(i,i,1,100)list
executes in less than 2 seconds.
(Credit to Frank Westlake)
[3.11] Store anything in a matrix
Matrices can hold more than just numbers. In fact, they can hold expressions, strings and variables. In
most programs, this makes matrices a better data structure than a data variable, since you cannot
directly write to the items in a data variable.
This tip from an anonymous poster: Lists can be saved in a matrix as strings. Use this to store the list:
string(list)M[j,k]
where list is the list and M is the matrix. Use this to extract the list:
3 - 6

Table of Contents

Other manuals for Texas Instruments TI-89

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Texas Instruments TI-89 and is the answer not in the manual?

Texas Instruments TI-89 Specifications

General IconGeneral
Display size (HxV)100 x 160 mm
Memory type639K FLASH ROM, 188K bytes RAM
Compatible operating systemsOperating System 2.09
Battery typeAAA

Related product manuals