Here are examples of usage of some of the most commonly used commands: (see keypress table for where to find these commands.)
"A MESSAGE" - displays a message 2->A - stores the value 2 in the variable A ?->A - prompts user for input, stores it in variable A Lbl 1 - labels a place in the program can use Lbl 0-9, A-Z Goto 1 - jumps to Lbl 1 Prog "ABC" - starts program "ABC" and returns when "ABC" is finished Dsz A - decrements A by 1, skips next statement if A now equals zero Isz A - increases A by 1, skips next statement if A now equals zero A=1=>"HI" - if A equals 1 then display "HI" 1234_ - pause to display number (also pauses for text, graphs, lines, points, matrices). Locate 1,1,"HELLO" - display message HELLO at screen position 1,1 Getkey->A - stores code for button pressed in variable A. (each button on keypad has a unique code.)Scrolling text effects can be acheived by not using the display symbol. However this only works for text : a display symbol must be used for numbers to appear at all.
Graph Y= - graphs a function of X ( e.g. Graph Y=sin X) ViewWindow 1,2,0,1,2,0 - set viewing parameters for graphs Cls - clears the graph screen (so does ViewWindow command) Plot 2,3 - plot a point at x=2, y=3 Line - draw a line between the last two points plotted
5! - factorial of 5 4 nPr 3 - permutations of 3 elements from 4 4 nCr 3 - combinations of 3 elements from 4 Ran# - produce a random number between 0 and 1 P( Q( R( t( - normal distribution functions Abs -2 - absolute value of the number -2 Int -2.6 - integer part rounded towards zero (this example gives -2) Intg -2.6 - integer part rounded towards -inf (this example gives -3) Frac 5.7 - fractional part of decimal number (this example gives 0.7) Rnd - changes internal accuracy to same as defined by FIX or SCI Pol(X,Y) - converts rectangular coords to polar, stores result in List Ans Rec(r, theta) - converts polar coords to rectangular, stores result in List Ans
[[1,2,3][4,5,6]] - a matrix with 2 rows and three columns, (first row is [1,2,3], second is [4,5,6]) [[1]]->Mat A - a one by one matrix is put into matrix A Mat A+Mat B - matrix A plus matrix B Mat A ^-1 - inverse of matrix A (use reciprocal symbol for ^-1) Det Mat A - determinant of matrix A Mat Ans - the result of the last matrix calculation Trn Mat A - transpose of matrix A Mat A[4,7] - the entry in the 4th row and 7th column of matrix A Swap A,2,3 - swap the 2nd and 3rd rows of matrix A *Row+ 5,A,2,3 - add five times row 2 to row 3 in matrix A Mat->List(Mat A,1) - a list consisting of row 1 of Mat A Augment(Mat A,Mat B) - if no.of rows is same in A and B then result is matrix whose first few columns are the columns of Mat A and the next lot of coloumns are the columns of Mat B. Identity N-> Mat A - An NxN identity matrix Dim Mat A - a 2 entry list containing no.of rows and columns of Mat A Fill(2,Mat A) - fills every entry of Mat A with the value 2 Abs,Frac,Int, Intg can also be applied to a matrix. e.g. Int Mat A gives applies Int to each entry to give new matrix. The commands Dim,Det,Trn also work with a specified matrix of values as well as named matrix. As do calculations, e.g. [[1,2,3]]+[[4,5,6]] e.g. Det[[1,2][3,4]]
{4,0,2}->List 1 - a list with three entries 4,0 and 2
{3.72}->List 1 - a list with just one entry
2.5->List 1[3] - an assignment into 3rd entry of List 1
List->Mat(List 1,List 2,...
- a matrix with List 1 in column 1, List 2 in column 2 etc
Dim List 1 - the number of entries in List 1
Fill(2,List 1) - fills every entry of List 1 with the number 2
Seq(X^3+1,X,1,9,2)
- a list of values generated by the expression X^3+1 where the
variable X goes from 1 to 9 with step value 2.
Min(List 1) - the minimum value in List 1
Min(List 1,List 2)
- a list equal to the list which has the min value of both lists
Max( - similar to Min(
Mean(List 1) - the mean value of List 1
Mean(List 1,List 2)
- the mean of values of List 1 with frequencies specified by List 2
Median( - similar to Mean(
Sum List 1 - sum of values in List 1
Prod List 1 - product of values in List 1
Cuml List 1 - a list with cumulative sum of values of List 1
Percent List 1
- a list of percentages corresponding to percentage each
entry of List 1 is compared to sum of entries in List 1
Most scientfic and arithmetic calculations and logic commands can be
applied to a list. They work on an entry by entry basis.
e.g. (List 1=0)->List 1 will give a list of zeros and ones accordingly.
sin List 1->List 1 will take sine of every entry.
List 1(Abs List 1>1 \exp 10)->List 1 will zero all elements which are too small.
The commands Dim,Sum,Prod,Cuml,Percent also work with a specified
list of values as well as named list.
As do calculations, e.g. {1,2,3}^{3,4,5}
e.g. Sum {1,2,4} is the same as {1,2,4}->List 1:Sum List 1
Here is the syntax used for control commands: ... is some set of commands. X is some conditional expression e.g (X+1>1) And (X+1<5) If X Then ... ... Else ; The Else section is optional ... ... IfEnd For 1->A To 30 Step 2 ; the Step is optional ... ... Next While X ... WhileEnd Do ... LpWhile XSee Tom Lynn's Calculator Encyclopaedia for more info on IfElse,ForNext,DoWhile and other commands and more details on logic commands and how to insert and append items to a list.
Fix 5 - displays numbers with 5 decimal places. (can use 0-9) Sci 5 - displays in scientific notation with 5 significant digits Norm - switches between norm1 and norm2, - norm1 shows small decimals in sci notation 0.001 as 1 E-03 - norm2 means no special formatting Eng - switches SI units, on or off.