# HP 50g User Manual Page 661

Graphing calculator.

Advertisement

functions from the MTH menu. Specifically, you can use functions for list
operations such as SORT, LIST, etc., available through the MTH/LIST menu.
As additional programming exercises, and to try the keystroke sequences listed
above, we present herein three programs for creating or manipulating lists. The
program names and listings are as follows:
LISC:
«
«
n x
1 n FOR j x NEXT n
CRLST:
«
st en df
" "
LIST
CLIST:
«
REVLIST DUP DUP SIZE 'n' STO
SWAP FOR j DUP
"
PURGE
The operation of these programs is as follows:
(1) LISC: creates a list of n elements all equals to a constant c.
Operation: enter n, enter c, press @LISC
Example: 5 ` 6.5 ` @LISC creates the list: {6.5 6.5 6.5 6.5 6.5}
(2) CRLST: creates a list of numbers from n
{n
, n
+ n, n1+2 n, ... n
1
1
Operation: enter n
Example: .5 `3.5 `.5 ` @CRLST produces: {0.5 1 1.5 2 2.5 3 3.5}
(3) CLIST: creates a list with cumulative sums of the elements, i.e., if the original
list is {x
x
1
2
Operation: place the original list in level 1, press @CLIST.
Example: {1 2 3 4 5} `@CLIST produces {1 3 6 10 15}.
«
st en FOR
LIST SWAP TAIL NEXT 1 GET n
1
, enter n
1
x
... x
}, then CLIST creates the list:
3
N
{
x
,
x
x
1
1
" "
LIST
j j df STEP en st - df / FLOOR 1 +
LIST SWAP TAIL DUP SIZE 1 - 1
to n
1
+N n }, where N=floor((n
, enter n, press @CRLST
2
,
x
x
x
,...,
2
1
2
3
LIST REVLIST 'n'
with increment n, i.e.,
2
-n
)/ n)+1.
2
1
N
x
}
i
i
1
Page 21-14

Advertisement

Table of Contents

Symbols: 0