Section 8. Processing and Math Instructions
8-5
Cosine
Returns the cosine of an
angle
.
Syntax
Cos(
angle
)
Remarks
The argument
angle
can be any valid numeric expression measured in radians.
The
Cos
function takes an
angle
and returns the ratio of two sides of a right
triangle. The ratio is the length of the side adjacent to the
angle
divided by the
length of the hypotenuse. The result lies in the range -1 to 1.
To convert degrees to radians, multiply degrees by Pi/180. To convert radians to
degrees, multiply radians by 180/Pi. Pi is approximately 3.141593.
Cos FunctionExample
The example uses Cos to calculate the cosine of an angle with a user-specified
number of degrees.
Dim Degrees, Pi, Radians, Ans
'Declare variables.
BeginProg
Pi = 4 * Atn(1)
'Calculate Pi.
Degrees = Volts(1)
'Get value to convert.
Radians = Degrees * (Pi / 180)
'Convert to radians.
Ans =
Cos(
Radians
)
‘The Cosine of Degrees.
EndProg
Spatial Covariance
The CovSpa instruction computes the covariance(s) of sets of data that are
loaded into arrays.
Syntax
CovSpa
(Dest, NumOfCov, SizeOfSets, CoreArray; DatArray)
CovSpa calculates the covariance(s) between the data in the CoreArray and
one or more data sets in the DatArray. The covariance of the sets of
data
X
and
Y
is calculated as:
2
1
1
1
)
,
(
n
Y
X
n
Y
X
Y
X
Cov
n
i
i
n
i
i
n
i
i
i
∑
∑
∑
=
=
=
−
⋅
=
Where n is the number of values in each data set (
SizeofSets
).
i
X
and
i
Y
are
the individual values of
X
and
Y
.
Содержание CR9000
Страница 6: ...CR9000 Table of Contents iv This is a blank page ...
Страница 22: ...CR9000 Overview OV 16 This is a blank page ...
Страница 26: ...Section 1 Installation 1 4 CR9000 FIGURE 1 1 3 CR9000 Battery Pack ...
Страница 72: ...Section 3 CR9000 Measurement Details 3 28 This is a blank page ...
Страница 88: ...Section 5 Program Declarations 5 6 This is a blank page ...
Страница 217: ...This is a blank page ...