Section 8. Processing and Math Instructions
8-31
Sqr Function Example
The example uses Sqr to calculate the square root of Volt(1) value.
Dim Msg, Number
'Declare variables.
Number = Volt(1)
'Get input.
If Number < 0 Then
Msg = 0
‘Cannot determine the square root of a
negative number.
Else
Msg = Sqr(Number)
End If
StdDevSpa
Used to find the standard deviation of an array.
Syntax
StdDevSpa(Dest, Swath, Source)
Remarks
Spatial standard deviation.
Dest
X i
X i
swath
swath
i j
i j swath
i j
i j swath
=
−
=
= +
=
= +
∑
∑
( )
( )
/
/
2
2
1
2
Where X(j) = Source
Parameter
& Data Type
Enter
Dest
Variable or
Array
The variable in which to store the results of the instruction.
Swath
Constant
The number of values of the array over which to perform the specified
operation.
Source
Array
The name of the variable array that is the input for the instruction.
Tan (Source)
Returns the tangent of an angle.
Syntax
x = Tan (source)
Remarks
Source can be any valid numeric expression measured in radians.
Tan takes an angle and returns the ratio of two sides of a right triangle. The
ratio is the length of the side opposite an angle divided by the length of the side
adjacent to the angle.
To convert degrees to radians, multiply degrees by
π
/180. To convert radians
to degrees, multiply radians by 180/
π
.
Summary of Contents for CR5000
Page 40: ...Section 1 Installation and Maintenance 1 16 This is a blank page ...
Page 54: ...Section 2 Data Storage and Retrieval 2 14 This is a blank page ...
Page 88: ...Section 4 CRBasic Native Language Programming 4 12 This is a blank page ...
Page 94: ...Section 5 Program Declarations 5 6 This is a blank page ...
Page 172: ...Section 7 Measurement Instructions 7 46 This is a blank page ...
Page 206: ......
Page 236: ...Index Index 4 This is a blank page ...
Page 237: ...This is a blank page ...