
Page 8-13
Defining functions that use lists
In Chapter 3 we introduced the use of the DEFINE function (
„à
) to
create functions of real numbers with one or more arguments. A function
defined with DEF can also be used with list arguments, except that, any
function incorporating an addition must use the ADD operator rather than the
plus sign (
+
). For example, if we define the function F(X,Y) = (X-5)*(Y-2),
shown here in ALG mode:
we can use lists (e.g., variables L1 and L2, defined earlier in this Chapter) to
evaluate the function, resulting in:
Since the function statement includes no additions, the application of the
function to list arguments is straightforward. However, if we define the
function G(X,Y) = (X+3)*Y, an attempt to evaluate this function with list
arguments (L1, L2) will fail:
To fix this problem we can edit the contents of variable
@@@G@@@
, which we can
list in the stack by using
…
@@@G@@@
,
to replace the plus sign (+) with ADD:
Содержание 49g+
Страница 1: ...hp 49g graphing calculator user s guide H Edition 4 HP part number F2228 90006 ...
Страница 197: ...Page 5 30 LIN LNCOLLECT POWEREXPAND SIMPLIFY ...
Страница 377: ...Page 11 55 Function KER Function MKISOM ...
Страница 457: ...Page 13 26 In the right hand side figure above we are using the line editor to see the series expansion in detail ...
Страница 775: ...Page 26 10 the location of the backup battery in the top compartment at the back of the calculator ...
Страница 838: ...Page L 5 ...