Documentation:Reference:TDI A2 - MdsWiki
Navigation
Personal tools

From MdsWiki

Jump to: navigation, search

ANY (MASK,[DIM])

F90 Transformation. Determine whether any value is true in MASK along
dimension DIM.

Arguments Optional: DIM.
MASK logical array.
DIM integer scalar from 1 to n-1, where n is rank of MASK.

Signals. None.
Units... None.
Form.... Logical. It is scalar if DIM is absent or MASK is a
vector; otherwise, the result is an array of rank n-1
and shaped like MASK with DIM subscript omitted.

Result.
(i) ANY(MASK) is $TRUE if any elements of MASK are true and
has $FALSE if no element is true or MASK is size zero.
(ii) For a vector MASK, ANY(MASK,DIM) is equal to ANY(MASK).
Otherwise, the value of an element of the result is
ANY of the elements of MASK varying the DIM subscript.

Examples.
(i) ANY([$TRUE,$FALSE,$TRUE]) is $TRUE.
(ii) For _B=[1 3 5] and _C=[0 3 5]
[2 4 6] [7 4 8]
ANY(_B NE _C,0) is [$TRUE,$FALSE,$TRUE].
ANY(_B NE _C,1) is [$TRUE,$TRUE].

See also. ALL for logical and, COUNT for the number of trues.

ARG (Z)

Mathematical Elemental. Argument of complex number in radians.

Argument. Z must be complex.

Signals. Same as Z.
Units... None, bad if Z has units.
Form.... Real of same shape.

Result.. ATAN2(AIMAG(Z),REAL(Z)).

Example. ARG(CMPLX(3.0,4.0)) is 0.9272952, approximately.

See also. ABS for the complex length.

ARGD (Z)

Mathematical Elemental. Argument of complex number in degrees.

Argument. Z must be complex.

Signals. Same as Z.
Units... None, bad if Z has units.
Form.... Real of same shape.

Result.. ATAN2D(AIMAG(Z),REAL(Z)).

Example. ARGD(CMPLX(3.0,4.0)) is 53.1301, approximately.

ARG_OF (A,[N])

MDS Operation. Get the N-th argument of a record descriptor.
The count does not include dscptrs like image or routine.

Arguments Optional: N.
A descriptor of class DSC$K_CLASS_R with arguments.
N integer scalar from 0 to the number of descriptors - 1.

Result.. The N-th argument pointed to by A searched for:
DSC$K_DTYPE_CALL
DSC$K_DTYPE_CONDITION, the condition field.
DSC$K_DTYPE_DEPENDENCY
DSC$K_DTYPE_FUNCTION
DSC$K_DTYPE_METHOD
DSC$K_DTYPE_PROCEDURE
DSC$K_DTYPE_ROUTINE
Otherwise, an error.

Example. ARG_OF(A+B,1) is B because A+B is a FUNCTION.

See also. DSCPTRS_OF for any descriptor.

ARRAY ([SHAPE],[MOLD])

Transformation. Generate an uninitialized array.

Arguments Optional: SHAPE, MOLD.
SHAPE integer vector.
MOLD any by example.
Signals. None.
Units... None.
Form.... Type of MOLD and shape (dimensions) is SHAPE. If SHAPE
is absent, the result is a scalar. If MOLD is absent,
the result will be floats.

Example. ARRAY([2,3,4],1d0) makes an array of double precision
reals of shape [2,3,4]. The value are not defined and
will depend on previous memory usage.
See also. RAMP, RANDOM, and ZERO.

ASIN (X)

F90 Mathematical Elemental. Arcsine (inverse sine).

Argument. X must be real and be less than or equal to 1 in
magnitude. Complex numbers cause an error.

Signals. Same as X.
Units... None, bad if X has units.
Form.... Real of same shape.

Result.. Processor approximation to arcsin(X) in radians.
It lies in the range -pi/2 to pi/2.
Out-of-range numbers get $ROPRAND.

Example. ASIN(0.84147098) is 1.0, approximately.

ASIND (X)

Mathematical Elemental. Arcsine (inverse sine) in degrees.

Argument. X must be real and be less than 1 in magnitude.
Complex numbers cause an error.

Signals. Same as X.
Units... None, bad if X has units.
Form.... Real of same shape.

Result.. Processor approximation to arcsin(X) in degrees.
It lies in the range -90 to 90.
Out-of-range numbers get $ROPRAND.

Example. ASIND(0.5) is 30.0, approximately.

AS_IS (X)

Compile operation. Protects the argument from one level of evaluation.

Argument. X may be any expression and may be a NID, PATH, or
FUNCTION.

Result.. The argument without evaluation.

Example. _A = AS_IS(_B * 3.0) makes the variable _A into an
expression. So whereever _A is used the current value of
_B will be multiplied by three and that will be used.
Note that _A = _B * 3.0 would have returned the then
current value and will not change as _B does.

ATAN (X)

F90 Mathematical Elemental. Arctangent (inverse tangent).

Argument. X must be real. Complex numbers are an error.

Signals. Same as X.
Units... None, bad if X has units.
Form.... Real of same shape.

Result.. Processor approximation to arctan(X) in radians.
It lies in the range -pi/2 to pi/2, inclusive.

Example. ATAN(1.5574077) is 1.0, approximately.

ATAN2 (Y,X)

F90 Mathematical Elemental. Arctangent (inverse tangent). The principal
value of the argument of the nonzero complex number
CMPLX(X,Y).

Arguments X any Y must be real. Complex numbers are an error.

Signals. Single signal or smaller data.
Units... None unless both have units and they don't match.
Form.... The compatible form of X and Y.

Result.. Processor approximation to arctan(Y/X) in radians.
It lies in the range -pi to pi.
If Y > 0, the result is positive.

Examples. ATAN2(1.5574077,1.0) is 1.0, approximately.
ATAN2([ 1 1], [-1 1]) is [ 3*pi/4 pi/4].
[-1 -1], [-1 1]) [-3*pi/4 -pi/4]

See also. ARG for the angle of a complex number.

ATAN2D (Y,X)

Mathematical Elemental. Arctangent (inverse tangent) in degrees. The
principal value of the argument of the nonzero complex
number CMPLX(X,Y).

Arguments X and Y must be real. Complex numbers are an error.

Signals. Single signal or smaller data.
Units... None unless both have units and they don't match.
Form.... The compatible form of X and Y.

Result.. Processor approximation to arctan(Y/X) in degrees.
It lies in the range -180 to 180.
If Y>0, the result is positive.

Example. ATAN2D(-1.0,-1.0) is -135.0, approximately.
ATAN2D([ 1 1], [-1 1]) is [ 135. 45.].
[-1 -1], [-1 1]) [-135. -45.]

See also. ARGD for the angle of a complex number in degrees.

ATAND (X)

Mathematical Elemental. Arctangent (inverse tangent) in degrees.

Argument. X must be real and be less than 1 in magnitude.
Complex numbers cause an error.

Signals. Same as X.
Units... None, bad if X has units.
Form.... Real of same shape.
Result.. Processor approximation to arctan(X) in degrees.
It lies in the range -90 to 90.

Example. ATAND(1.0) is 45.0, approximately.

ATANH (X)

Mathematical Elemental. Hyperbolic arctangent (inverse tangent).

Argument. X must be real. Complex numbers cause an error.

Signals. Same as X.
Units... None, bad if X has units.
Form.... Real of same shape.

Result.. Processor approximation to arctanh(X) in radians.

Example. ATANH(0.7615942) is 1.0, approximately.

AXIS_OF (A)

MDS Operation. Get the axis field.

Argument. Descriptor as below.

Result.. A is searched for these:
DSC$K_DTYPE_DIMENSION, the axis field.
DSC$K_DTYPE_RANGE, the range.
DSC$K_DTYPE_SLOPE, the slope, !deprecated!.
Otherwise, an error.

Example. AXIS_OF(BUILD_DIM(BUILD_WINDOW(B,E,X0),1..10)) is 1..10.