Avgspa (dest, swath, source), Ceiling(source), Cos(source) – Campbell Scientific CR9000X Measurement and Control System User Manual
Page 296: Swath i x, Dest

Section 8. Processing and Math Instructions
AvgSpa (Dest, Swath, Source)
The AvgSpa function computes the spatial average of a swath of elements on an
array.
Syntax
AvgSpa(
Dest, Swath, Source
)
Remarks
Find the average of the values in the given array and place the result in the variable
named in Dest. The Source must be a particular element in an array (e.g., Temp(1));
it is the first element in the array to include in the average. The Swath is the
number of elements of the array to include in the average.
swath
i
X
swath
j
i
j
i
∑
−
+
=
=
1
)
(
Dest
=
Where X(j) = Source
NANs are not included in the processing of the Spatial Average.
Parameter
& Data Type
Enter
AVGSPA PARAMETERS
Dest
Variable
The variable in which to store the results of the instruction.
Swath
Constant
The number of values of the source array to average.
Source
Array
The name of the variable array that is the input for the instruction.
Average Spatial Output Example
This example uses AvgSpa to compute the average value of the five elements
Temp(6) through Temp(10) and store the result in the variable AvgTemp.
AvgSpa
(AvgTemp, 5, Temp(6))
Ceiling(Source)
The Ceiling function rounds a value up to the next integer value.
Syntax
Variable = Ceiling(
Source
)
Remarks
The Ceiling function rounds a Number up to an integer value. To round a value
down to an integer, use the Floor function. To perform arithmetic rounding on a
value, use the Round function.
COS(Source)
Returns the cosine of an angle.
Syntax
COS(
Source
)
8-10