Imag(), Input – Texas Instruments PLUS TI-89 User Manual

Page 474

Advertising
background image

Appendix A: Functions and Instructions 457

8992APPA.DOC TI-89 / TI-92 Plus: Appendix A (US English) Susan Gullord Revised: 02/23/01 1:48 PM Printed: 02/23/01 2:21 PM Page 457 of 132

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+2i) ¸

2

imag(z) ¸

0

imag(x+iy) ¸

y

imag(

list1

)

list

Returns a list of the imaginary parts of the
elements.

imag({л 3,4л i,i}) ¸

{0 ë 1 1}

imag(

matrix1

)

matrix

Returns a matrix of the imaginary parts of the
elements.

imag([a,b;ic,id

]) ¸

[

0 0
c d

]

Input

CATALOG

Input

Pauses the program, displays the current
Graph screen, and lets you update variables
xc

and yc (also rc and

qc for polar coordinate

mode) by positioning the graph cursor.

When you press ¸, the program resumes.

Program segment:

©

:¦

Get 10 points from the Graph

Screen

:For i,1,10
: Input
: xc! XLIST[i]

: yc! YLIST[i]

:EndFor

©

Input [

promptString

,]

var

Input

[

promptString

],

var

pauses the program,

displays

promptString

on the Program I/O

screen, waits for you to enter an expression,
and stores the expression in variable

var

.

If you omit

promptString

, “?” is displayed as a

prompt.

Program segment:

©

:For i,1,9,1
: "Enter x" & string(i)! str1

: Input str1,#(right(str1,2))
:EndFor

©

Advertising
This manual is related to the following products: