HP (Hewlett-Packard) HP-12C Calculator User Manual


 
74
*At step 38, m=number of elements in the moving average, i.e. fir a 5
element moving average line 38 would be
5 and for a 12-element
average line 38 would be
2
This program can be used for a moving average of 2 to 12 elements. It
may be shortened considerably for moving averages with less than 12
elements. To do this, key in the program, as shown, form line 01 until you
reach a
superscripted with the number of elements you desire. Key in
this line, then skip the reset of the program down to line 35. Then key in
lines 35 through 39, being sure to specify the register number at line 38,
m, corresponding to the number of elements you are using. (For
instance, for a 5 element moving average, key in lines 01 through 13 then
go to line 35 in the listing and key in the balance of the program. Obviously
the program listing line 38,
m becomes the displayed line 17,
5).
To run the program:
1. Key in the program.
2. Press CLEAR . Key in the number of elements, m, and press 0.
3. Key in the second data point and press 1.
4. Key in the second data point and press 2.
37- 31
m*
38- 44 --
01
39-43, 33 01
REGISTERS
n: Unused i: Unused
PV: Unused PMT: Unused
FV: Unused
R
0
: m
R
1
: X
1
R
2
: X
2
R
3
: X
3
R
4
: X
4
R
5
: X
5
R
6
: X
6
R
7
: X
7
R
8
: X
8
R
9
: X
9
R
.0
: X
.0
R
.1
: X
11
R
.2
: X
12
R
.3
-R
.4
: Unused