TI-Nspire™ Reference Guide 105
Try
Catalog
>
Try
block1
Else
block2
EndTry
Executes block1 unless an error occurs. Program execution transfers
to block2 if an error occurs in block1. System variable errCode
contains the error code to allow the program to perform error
recovery. For a list of error codes, see “Error codes and
messages,” page 137.
block1 and block2 can be either a single statement or a series of
statements separated with the “:” character.
Note for entering the example: In the Calculator application
on the handheld, you can enter multi-line definitions by pressing @
instead of · at the end of each line. On the computer keyboard,
hold down Alt and press Enter.
Example 2
To see the commands Try, ClrErr, and PassErr in operation, enter
the eigenvals() program shown at the right. Run the program by
executing each of the following expressions.
Note: See also ClrErr, page 17, and PassErr, page 73.
Define eigenvals(a,b)=Prgm
© Program eigenvals(A,B) displays eigenvalues of A·B
Try
Disp "A= ",a
Disp "B= ",b
Disp " "
Disp "Eigenvalues of A·B are:",eigVl(a*b)
Else
If errCode=230 Then
Disp "Error: Product of A·B must be a square matrix"
ClrErr
Else
PassErr
EndIf
EndTry
EndPrgm
tTest
Catalog
>
tTest m0,List[,Freq[,Hypoth]]
(Data list input)
tTest m0,x,sx,n,[Hypoth]
(Summary stats input)
Performs a hypothesis test for a single unknown population mean m
when the population standard deviation s is unknown. A summary of
results is stored in the stat.results variable. (See page 97.)
Test H
0
: m = m0, against one of the following:
For H
a
: m < m0, set Hypoth<0
For H
a
: m ƒ m0 (default), set Hypoth=0
For H
a
: m > m0, set Hypoth>0
For information on the effect of empty elements in a list, see “Empty
(void) elements” on page 131.