Radio Shack TRS-80 PC-3 Owner's Manual page 200

Table of Contents

Advertisement

60: FOR I = 1 TO N
70: PRINT "PAIR "; I
80: INPUT "X? "; X(I)
90: INPUT "V? "; V
(I)
100: NEXT I
110:WAIT 128
120: INPUT "DISPLAV OR PRINTER? ";W$
130: IF ( LEFT$ (W$, 1) = "P") THEN PRINT = LPRINT
140: INPUT "LIST OF DATA? "; W$
150: IF (LEFT$ (W$,1) = "V") THEN LET
V
= 1
160: FOR I = 1 TO N
170: IF
(V
= 1) THEN PRINT X
(I) ,
V(I)
180: A = A + X(I)
190: B = B + X(I)
1\
2
200: C = C + V(I)
210: D = D + (V(I)1\2)
220: E=E+(X(I)*V(I))
230: NEXT I
240: WAIT
250: F = AIN
260: PRINT "MEAN OF X = "; F
270: G
=
C/N
280: PRINT "MEAN OF V = "; G
Loop for number of observations
Prompt with number of pair
Prompt and input X
Prompt and input V
Reset WAIT time for data listing
Ask if output is to display or printer
If printer, then switch
Ask if listing of data is desired
If so, set flag; default
V={J
set in line 10
Loop through data
If flag is set, then print observation pair
Accumulate the sum of
X
Accumulate the sum of the squares of X
Accumulate the sum of V
Accumulate the sum of the squares of V
Accumulate the sum of the products of the pairs
Reset WAIT so that Enter is required
Compute mean of X
And display
Compute mean of V
And display
200

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents