Creating your own functions – HP Prime Graphing Wireless Calculator User Manual
Page 217
Functions and commands
213
expression
var
i
Inserts the imaginary number i.
–1
Returns the inverse of an expression.
(Expr)
–1
Creating your own functions
You can create your own function by writing a program (see
chapter 5) or by using the simpler DEFINE functionality.
Functions you create yourself appear on the User menu (one
of the Toolbox menus).
Suppose you wanted to create the function
SINCOS(A,B)=SIN(A)+COS(B)+C.
1. Press
Sd
(Define).
2. In the Name field, enter
a name for the
function—for example,
SINCOS—and tap
.
3. In the Function field,
enter the function.
eA
A
>+fA
B
>A
C
New fields appear
below your function, one
for each variable used in
defining it. You need to
decide which ones are
to be input arguments
for your functions and
which ones are global
variables whose values
are not input within the function. In this example, we’ll
make A and B input variables, so our new function takes
two arguments. The value of C will be provided by global
variable C (which by default is zero).
4. Make sure that A and B are selected and C is not.