Texas Instruments TI-89 Manual Book page 224

Ti ti-89: user guide
Hide thumbs Also See for TI-89:
Table of Contents

Advertisement

Using a Multi-
Statement, User-
Defined Function
Note: For information about
similarities and differences
between functions and
programs, refer to
Chapter 17.
Tip: Graph math results
may vary.
From the Home
Screen or a Program
For three or more pieces, you may want to create a multi-statement,
user-defined function.
For example, consider the previous three-piece function.
When:
Use expression:
x < ìp
4 sin(x)
x ‚ ìp
and
x < 0
2x + 6
x ‚ 0
6 ìxñ
A multi-statement, user-defined function can have many of the
control and decision-making structures (
in programming. When creating the structure of a function, it may be
helpful to visualize it first in a block form.
Func
If x<-p Then
Return 4ùsin(x)
ElseIf x>=-p and x<0 Then
Return 2x+6
Else
Return 6ìx^2
EndIf
EndFunc
When entering a multi-statement function on the Y= Editor or Home
screen, you must enter the entire function on a single line.
Use a colon (:) to separate each statement.
Func:If x<-p Then:Return 4ùsin(x): ... :EndIf:EndFunc
On the Y= Editor:
Only "Func" is shown
for a multi-statement
function.
Enter a multi-statement
function on one line. Be
sure to include colons.
From the Home screen, you can also use the
create a multi-statement, user-defined function. Refer to page 204 for
other information on copying a function from the Home screen to the
Y= Editor.
From the Program Editor (Chapter 17), you can create a user-defined
function. For example, use the Program Editor to create a function
named
. In the Y= Editor, set
f1(xx)
,
If
ElseIf
y1(x) = f1(x)
Chapter 12: Additional Graphing Topics
,
, etc.) used
Return
Func and EndFunc
must begin and end the
function.
For information about
the individual
statements, refer to
Appendix A.
Define
command to
.
207

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Ti-92 plusTi-92 plus

Table of Contents