Installation guide

Programming Commands 149
SHIFT Miscellaneous Command
ACTION: Shifts the elements of a single-dimension numeric array up or down.
PROGRAM SYNTAX: SHIFT (array, n)
REMARKS: n is the number of shifts to perform on the array. If n is a positive num-
ber, the array is shifted up and the top elements are discarded. If n is a
negative number the array is shifted down and the bottom elements are
discarded. Zeroes are shifted into the array.
EXAMPLES: This example illustrates the effect of shift commands on a 4-element ar-
ray "x".
x(0) x(1) x(2) x(3)
1 2 3 4 x before shift command
0 1 2 3 x after SHIFT(x,1)
2 3 4 0 x after SHIFT(x, -1)
SIGN Mathematics Function
ACTION: Returns the sign of an expression.
PROGRAM SYNTAX: SIGN(expression) - used in an expression
REMARKS: If the expression is positive, the SIGN function returns 1.
If the expression is zero, the SIGN function returns 0.
If the expression is negative, the SIGN function returns -1.
EXAMPLES: SIGN(-10.0) ‘ evaluates to -1
SIGN(10) 'evaluates to 1
SIGN(0) ‘ evaluates to a 0
SIN Mathematics Function
ACTION: Returns the sine of the angle x, where x is in radians.
PROGRAM SYNTAX: SIN(x) - used in an expression
REMARKS: To convert values from degrees to radians, multiply the angle (in de-
grees) times Pi/180 (or .017453) where Pi= 3.141593.
To convert a radian value to degrees, multiply it by 180/Pi (or
57.295779).
EXAMPLES: conv = 3.141593 / 180'converts degrees to radians
A = SIN (conv * 45)’ A = sin (45 degrees ) or .7071