37-

 

31

 

 

 

 

 

m*

 

38-

44

--

01

 

39-43, 33

01

 

 

 

 

 

 

REGISTERS

 

 

n: Unused

 

i: Unused

 

PV: Unused

 

PMT: Unused

 

FV: Unused

 

R0: m

 

 

R1: X1

 

R2: X2

 

 

R3: X3

 

R4: X4

 

 

R5: X5

 

R6: X6

 

 

R7: X7

 

R8: X8

 

 

R9: X9

 

R.0: X.0

 

 

R.1: X11

 

R.2: X12

 

 

R.3-R.4: Unused

 

 

 

 

*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.

74

Page 75
Image 75
HP 12C manual Unused PV Unused PMT Unused FV Unused R .4 Unused