AVG Average
Example
10 OUTPUT
718;"IP;"
20 OUTPUT
718;"SNGLS;"
30 OUTPUT
718;"DET
POS;TS;"
40 OUTPUT 718;"VIEW
TRA;"
50 OUTPUT
718;"DET
SMP;"
60 OUTPUT
718;"CLRW
TRB;TS;"
70 OUTPUT
718;"VIEW
TRB;"
80 OUTPUT
718;"AVG
TRA,TRB,2;"
90 OUTPUT
718;"BLANK
TRB;"
100 END
Description
Initializes spectrum
analyzez
Activates single-sweep mode.
Activates the positive-peak detector and updates the
trace.
Stores results and displays trace A.
Activates sample detection.
Activates trace B and takes a sweep of trace
B
LXsplafys
trace
B
Averages traces B and A with ratio of 2 and stores the
result in trace A.
Blanks trace B and displays result in trace A.
The AVG command averages the source and the destination and then stores the result in the
destination according to the following algorithm:
Average
=
((ratio
-
1) x destination) + source
ratio
The results of AVG are invalid if the ratio is equal to zero.
When the source is longer than the destination, the source is truncated to fit. When the source
is shorter than the destination, the last element is repeated to fill the destination.
5-74 Programming Commands