Transformation. Element selection from an array. Arguments A an array of any type considered to be a vector. B a list of offsets into the A array. Values are from 0 to the number of elements in A less 1. Out-of-bounds values are considered to be at the limits. Signals. Same as B. Units... Same as A. Form.... Same type as A and same shape as B. Result.. Each value in B is used to look up a value in A. The value is copied into the result. This is the same as A(B) in IDL when B is a vector. >>>>>>>>>WARNING, multidimensional arrays referenced by bad offsets will likely be junk. Examples. MAP(1..10,[20,-1,5]) is [10,1,6]. _A=5..1..-1, MAP(_A,SORTI(_A)) is [1,2,3,4,5], which is the same as SORT(5..1..-1). See also. CULL to remove bad B values. SUBSCRIPT for dimensional indexing into signal and multiple index access to arrays.
F90 Numeric Elemental. Maximum value. Arguments Integer or real. Complex numbers are an error. Signals. The single signal or the smallest. Units... The single or matching units, else bad. Form.... The compatible form of all the arguments. Conversion is done pairwise. Result.. The largest argument. A reserved operand will dominate. Example. MAX(-9.0,7.0,2.0) is 7.0.
F90 Inquiry. The maximum exponent in the model representing numbers of the same type as the argument. Argument. X is real, scalar or array. Signals. None. Units... None. Form.... Integer scalar. Result.. The number emax for the model of the same type as X. Example. MAXEXPONENT(1.0) is 127 on the VAX.
F90 Transformation. Determine the location of an element of ARRAY with the maximum value of the elements identified by MASK. Arguments Optional: MASK. ARRAY numeric array. MASK logical and conformable with ARRAY. Signals. None. Units... None. Form.... Long vector of size equal to rank of ARRAY. Result.. The result is the vector of subscripts of an element whose value equals the maximum of all elements of ARRAY or all elements for which MASK is true. Reserved operands ($ROPRAND) are ignored. Each subscript will be in the extent of its dimension. For zero size, no true elements in MASK, or all $ROPRAND the result is undefined. If more than one element has the maximum value the result is the first in array order. The result is an offset vector even if there is a lower bound. Examples. MAXLOC([2,4,6]) is [2]. For _A=[0 -5 8 -3], MAXLOC(_A,_A LT 6) is [2,1]. [3 4 -1 2] [1 5 6 -4] See also. MAXVAL for the value.
F90 Transformation. Maximum value of the elements of ARRAY along dimension DIM corresponding to true elements of MASK. Arguments Optional: DIM, MASK. ARRAY numeric array. DIM integer scalar from 0 to n-1, where n is rank of ARRAY. MASK logical and conformable to ARRAY. Signals. Same as ARRAY if DIM-th or all dimensions omitted. Units... Same as ARRAY. Form.... Same type as ARRAY. It is a scalar if DIM is absent or ARRAY is scalar or vector. Otherwise, the result is an array of rank n-1 and shaped like ARRAY with DIM subscript omitted. Result.. The result without DIM is the maximum value of the elements of ARRAY, testing only those with true MASK values and value not equal to the reserved operand ($ROPRAND). With DIM, the value of an element of the result is the maximum of ARRAY elements with DIM dimension fixed as the element number of the result. If no value is found, -HUGE(ARRAY) is returned. Examples. MAXVAL([1,2,3]) is 3. MAXVAL(_C,,_C LT 0) finds the maximum negative element of C. If _B=[[1, 3, 5],[2, 4, 6]] MAXVAL(_B,0) is [5,6] and MAXVAL(_B,1) is [2,4,6]. See also. MAXLOC for the location.
Transformation. Average value of the elements of ARRAY along dimension DIM corresponding to the true elements of MASK. Arguments Optional: DIM, MASK. ARRAY numeric array. DIM integer scalar from 0 to n-1, where n is rank of ARRAY. MASK logical and conformable to ARRAY. Signals. Same as ARRAY if DIM-th or all dimensions omitted. Units... Same as ARRAY. Form.... Same type as ARRAY. It is a scalar if DIM is absent or ARRAY is scalar or vector. Otherwise, the result is an array of rank n-1 and shaped like ARRAY with DIM subscript omitted. Result.. The result without DIM is the mean value of the elements of ARRAY, testing only those with true MASK values and value not equal to the reserved operand ($ROPRAND). With DIM, the value of an element of the result is the mean of ARRAY elements with dimension DIM fixed as the element number of the result. If no value is found, zero is given. Examples. MEAN([1,2,3]) is 2. MEAN(_C,,_C GT 0) finds the mean of positive element of C. If : _B=[[1, 3, 5],[2, 4, 6]] MEAN(_B,0) is [3,4] and MEAN(_B,1) is [1,3,5].
F90 Logical Elemental. Choose alternative value according to a mask. Arguments TSOURCE any type compatible with FSOURCE. FSOURCE any type compatible with TSOURCE. MASK logical, conformable with TSOURCE and FSOURCE. Signals. Single signal or smaller data. Units... Single or common units (excluding MASK), else bad. Form.... The type is the compatible type of FSOURCE and TSOURCE. The shape conformable to FSOURCE, TSOURCE, and MASK. Result.. If the MASK value is true, the TSOURCE value is use; otherwise, the FSOURCE value is use. Examples. MERGE([1,2,3],[4,5,6],[$TRUE,$FALSE,$TRUE]) is [1,5,3]. If TSOURCE is the array [1 6 5], FSOURCE is the array [2 4 6] [0 3 2] and MASK is [1 0 1], [7 4 8] [0 0 1] then MERGE(TSOURCE,FSOURCE,MASK) is [1 3 5]. [7 4 6] See also. CONDITIONAL with form: MASK ? TSOURCE : FSOURCE, for scalar mask test.
MDS Operation. Get the method field. Argument. Descriptor as below. Result.. A is searched for this: DSC$K_DTYPE_METHOD, the method field. Otherwise, an error.
F90 Numeric Elemental. Minimum value. Arguments Integer or real. Complex numbers are an error. Signals. The single signal or the smallest. Units... The single or matching units, else bad. Form.... The compatible form of all the arguments. Conversion is done pairwise. Result.. The smallest argument. A reserved operand will dominate. Example. MIN(-9.0,7.0,2.0) is -9.0.
F90 Inquiry. The minimum exponent in the model representing numbers of the same type as the argument. Argument. X must be real or complex, scalar or array. Signals. None. Units... None. Form.... Integer scalar. Result.. The number emin for the model of the same type as X. Example. MINEXPONENT(1.0) is -127 on the VAX.
F90 Transformation. Determine the location of an element of ARRAY having the minimum value of the elements identified by MASK. Arguments Optional: MASK. ARRAY numeric array. MASK logical and conformable with ARRAY. Signals. None. Units... None. Form.... Long vector of size equal to rank of ARRAY. Result.. The result is the vector of subscripts of an element whose value equals the minimum of all elements of ARRAY or all elements for which MASK is true. Reserved operands ($ROPRAND) are ignored. Each subscript will be in the extent of its dimension. For zero size, no true elements in MASK, or all $ROPRAND the result is undefined. If more than one element has the maximum value the result is the first in array order. The result is an offset vector even if there is a lower bound. Examples. MINLOC([2,4,6]) is [0]. For _A=[0 -5 8 -3], MINLOC(_A,_A GT -4) is [0,3]. [3 4 -1 2] [1 5 6 -4] See also. MINVAL for the value.
F90 Transformation. Minimum value of the elements of ARRAY along dimension DIM corresponding to true elements of MASK. Arguments Optional: DIM, MASK. ARRAY numeric array. DIM integer scalar from 0 to n-1, where n is rank of ARRAY. MASK logical and conformable to ARRAY. Signals. Same as ARRAY if DIM-th or all dimensions omitted. Units... Same as ARRAY. Form.... Same type as ARRAY. It is a scalar if DIM is absent or ARRAY is scalar or vector. Otherwise, the result is an array of rank n-1 and shaped like ARRAY with DIM subscript omitted. Result.. The result without DIM is the minimum value of the elements of ARRAY, testing only those with true MASK values and value not equal to the reserved operand ($ROPRAND). With DIM, the value of an element of the result is the minimum of ARRAY elements with DIM dimension fixed as the element number of the result. If no value is found, +HUGE(ARRAY) is returned. Examples. MINVAL([1,2,3]) is 3. MINVAL(_C,,_C GT 0) finds the minimum positive element of C. If _B=[[1, 3, 5],[2, 4, 6]] MINVAL(_B,0) is [1,2] and MINVAL(_B,1) is [1,3,5]. See also. MINLOC for the location.
F90 Numeric Elemental. Remainder. Usual Form A MOD P. Arguments A and P must be integer or real. Complex numbers are an error. Signals. Single signal or smaller data. Units... Single or common units, else bad. Form.... Compatible form of A and P. Result.. If P NE 0, the result is A-INT(A/P)*P. If P==0, the result is the $ROPRAND for reals and undefined for integers. Examples. MOD(3.0,2.0) is 1.0. MOD(8,5) is 3. MOD(-8,5) is -3. MOD(8,-5) is -3. MOD(-8,-5) is -3.
MDS Operation. Get the model field. Argument. Descriptor as below. Result.. A is searched for this: DSC$K_DTYPE_CONGLOM, the model field. Otherwise, an error.
Numeric Elemental. Multiplication. Usual Form X * Y. Function Form MULTIPLY(X,Y). Arguments X and Y must be numeric. Signals. Single signal or smaller data. Units... Those of X joined with those of Y by an asterisk. Form.... Compatible form of X and Y. Result.. Product of corresponding elements of X and Y. >>>>>>>>>WARNING, integer overflow is ignored. Examples. 3.0 * 2 is 6.0. BUILD_WITH_UNITS(3.0,"V") * BUILD_SIGNAL(BUILD_WITH_UNITS($VALUE*2,"s"),4)) is BUILD_SIGNAL(BUILD_WITH_UNITS(24.0,"V*s"),4).