
Section 8. Processing and Math Instructions
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 (Dest, Swath, Source)
Used to find the standard deviation of an array.
Syntax
StdDevSpa(Dest, Swath, Source)
Remarks
Spatial standard deviation.
Dest Xi Xi swath swath
ij
ijswath
ij
ijswath
=−
⎛
⎝
⎜
⎞
⎠
⎟
⎛
⎝
⎜
⎞
⎠
⎟
⎛
⎝
⎜
⎞
⎠
⎟
=
=+
=
=+
∑∑
() () / /
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/π.
8-33
Comentarios a estos manuales