Identity(), Imag(), 830 appendix a: functions and instructions – Texas Instruments TITANIUM TI-89 User Manual
Page 830
830
Appendix A: Functions and Instructions
identity()
MATH/Matrix menu
identity(
expression
)
⇒
⇒
⇒
⇒
matrix
Returns the identity matrix with a dimension of
expression
.
expression
must evaluate to a positive integer.
identity(4) ¸
1 0 0 0
0 1 0 0
0 0 1 0
0 0 0 1
If
CATALOG
If
Boolean expression
If
Boolean expression
Then
statement
block
EndIf
If
Boolean expression
evaluates to true, executes
the single statement
statement
or the block of
statements
block
before continuing execution.
If
Boolean expression
evaluates to false, continues
execution without executing the statement or
block of statements.
block
can be either a single statement or a
sequence of statements separated with the “:”
character.
Program segment:
©
:If x<0
:Disp "x is negative"
©
—
or
—
©
:If x<0 Then
: Disp "x is negative"
: abs(x)! x
:EndIf
©
If
Boolean expression
Then
block1
Else
block2
EndIf
If
Boolean expression
evaluates to true, executes
block1
and then skips
block2
.
If
Boolean expression
evaluates to false, skips
block1
but executes
block2
.
block1
and
block2
can be a single statement.
Program segment:
©
:If x<0 Then
: Disp "x is negative"
: Else
: Disp "x is positive or zero"
:EndIf
©
If
Boolean expression1
Then
block1
ElseIf
Boolean expression2
Then
block2
©©©©
ElseIf
Boolean expressionN
Then
blockN
EndIf
Allows for program branching. If
Boolean
expression1
evaluates to true, executes
block1
. If
Boolean expression1
evaluates to false, evaluates
Boolean expression2
, etc.
Program segment:
©
:If choice=1 Then
: Goto option1
: ElseIf choice=2 Then
: Goto option2
: ElseIf choice=3 Then
: Goto option3
: ElseIf choice=4 Then
: Disp "Exiting Program"
: Return
:EndIf
©
imag()
MATH/Complex menu
imag(
expression1
)
⇒
⇒
⇒
⇒
expression
imag(
expression1
)
returns the imaginary part of
the argument.
Note: All undefined variables are treated as real
variables. See also
real()
.
imag(1+2
i
)
¸
2
imag(z)
¸
0
imag(x+
i
y)
¸
y
imag(
list1
)
⇒
⇒
⇒
⇒
list
Returns a list of the imaginary parts of the
elements.
imag({ë3,4ëi,i}) ¸ {0
л
1 1}