From MdsWiki
(Difference between revisions)
Revision as of 03:52, 23 January 2007 (edit) WikiSysop (Talk | contribs) ← Previous diff |
Revision as of 03:55, 23 January 2007 (edit) WikiSysop (Talk | contribs) Next diff → |
||
Line 3: | Line 3: | ||
| | | | ||
__NOTOC__ | __NOTOC__ | ||
- | <span id=“name_of“></span> | + | <span id="map"></span> |
- | ==NAME_OF (A)== | + | ==MAP (A,B)== |
- | MDS Operation. Get the name field. <br /><br /> Argument. Descriptor as below. <br /><br /> Result.. A is searched for this: <br /> DSC$K_DTYPE_CONGLOM, the name field. <br /> Otherwise, an error. <br /><br /> | + | Transformation. Element selection from an array. <br /><br /> Arguments <br /> A an array of any type considered to be a vector. <br /> B a list of offsets into the A array. <br /> Values are from 0 to the number of elements in A less 1. <br /> Out-of-bounds values are considered to be at the limits. <br /><br /> Signals. Same as B. <br /> Units... Same as A. <br /> Form.... Same type as A and same shape as B. <br /><br /> Result.. Each value in B is used to look up a value in A. <br /> The value is copied into the result. <br /> This is the same as A(B) in IDL when B is a vector. <br /> >>>>>>>>>WARNING, multidimensional arrays referenced by bad offsets <br /> will likely be junk. <br /><br /> Examples. MAP(1..10,[20,-1,5]) is [10,1,6]. <br /> _A=5..1..-1, MAP(_A,SORTI(_A)) is [1,2,3,4,5], <br /> which is the same as SORT(5..1..-1). <br /><br /> See also. CULL to remove bad B values. <br /> SUBSCRIPT for dimensional indexing into signal and <br /> multiple index access to arrays. <br /><br /> |
- | <span id=“nand“></span> | + | <span id="matmul"></span> |
- | ==NAND (L,M)== | + | ==matmul (MATRIX_A,MATRIX_B)== |
- | Logical Elemental. Negation of logical intersection of elements. <br /> Usual Forms L NAND M. <br /><br /> Arguments L and M must be logical (lowest bit is 1 for true). <br /><br /> Signals. Single signal or smaller data. <br /> Units... None unless both have units and they don't match. <br /> Form.... Logical of compatible shape. <br /><br /> Result.. False if both are true; otherwise, true. <br /><br /> Example. [0,0,1,1] && [0,1,0,1] is [$TRUE,$TRUE,$TRUE,$FALSE]. <br /><br /> | + | F90 Transformation. Performs matrix multiplication of numeric matrices. <br /><br /> Arguments <br /> MATRIX_A numeric array of rank one or two. A vector is <br /> considered to be of shape [1,m]. <br /> MATRIX_B numeric array of rank one or two. The size of the first <br /> dimension of MATRIX_B must be the same as the size of <br /> the last dimension of MATRIX_A. A vector is considered <br /> to be of shape [m,1]. <br /> There is no support for F90 logical arrays. <br /><br /> Signals. Single signal or smaller data. <br /> Units... Same as for MATRIX_A * MATRIX_B. <br /> Form.... If MATRIX_A has shape [n,m] and MATRIX_B has shape <br /> [m,k], the result has shape [n,k]. For rank-one cases, <br /> the n or k is omitted. <br /><br /> Result.. Result element [i,j] is <br /> SUM(MATRIX_A[i,:] * MATRIX_B[:,j]). <br /><br /> Examples. MATMUL(_A=[1 2 3],_B=[1 2]) is [14 20]. <br /> [2 3 4] [2 3] [20 29] <br /> [3 4] <br /> MATMUL([1,2],_A) is vector-matrix product [5,8,11]. <br /> MATMUL(_A,[1,2,3]) is matrix-vector product [14,20]. <br /><br /> |
- | <span id=“or“></span> | + | <span id="mat_rot"></span> |
- | ==OR (L,M)== | + | ==mat_rot (MATRIX,ANGLE,MAG,X0,Y0)== |
- | Logical Elemental. Logical union of elements. <br /> Usual Forms L || M, L OR M. <br /> Function Form OR(L,M). <br /><br /> Arguments L and M must be logical (lowest bit is 1 for true). <br /><br /> Signals. Single signal or smaller data. <br /> Units... None unless both have units and they don't match. <br /> Form.... Logical of compatible shape. <br /><br /> Result.. True if either is true; otherwise, false. <br /> >>>>>>>>>WARNING, do not confuse with | which is bit-wise IOR. <br /><br /> Example. [0,0,1,1] || [0,1,0,1] is [$FALSE,$TRUE,$TRUE,$TRUE]. <br /><br /> | + | Transformation. Rotate a matrix about a point. <br /><br /> Arguments <br /> MATRIX rank-two array. <br /> ANGLE real scalar, clockwise? rotation of the data. <br /> MAG real scalar, magnification. <br /> X0 real scalar, first axis center of rotation. <br /> Y0 real scalar, second axis center of rotation. <br /><br /> Signals. Same as MATRIX. <br /> Units... Same as MATRIX. <br /> Form.... Same as MATRIX. <br /><br /> Result.. The value at closest grid point to the rotated array. <br /><br /> Example. ?? <br /><br /> |
- | <span id=“or_not“></span> | + | <span id="mat_rot_int"></span> |
- | ==OR_NOT (L,M)== | + | ==mat_rot_int (MATRIX,ANGLE,MAG,X0,Y0)== |
- | Logical Elemental. Logical union of first with negation of second. <br /> Accepted Form. L OR_NOT M. <br /><br /> Arguments L and M must be logical (lowest bit is 1 for true). <br /><br /> Signals. Single signal or smaller data. <br /> Units... None unless both have units and they don't match. <br /> Form.... Logical of compatible shape. <br /><br /> Result.. True if L is true or M is false; otherwise, false. <br /><br /> Example. [0,0,1,1] OR_NOT [0,1,0,1] is [$TRUE,$FALSE,$TRUE,$TRUE]. | + | Transformation. Rotate a matrix about a point with interpolation. <br /><br /> Arguments <br /> MATRIX rank-two array. <br /> ANGLE real scalar, clockwise? rotation of the data. <br /> MAG real scalar, magnification. <br /> X0 real scalar, first axis center of rotation. <br /> Y0 real scalar, second axis center of rotation. <br /><br /> Signals. Same as MATRIX. <br /> Units... Same as MATRIX. <br /> Form.... Same as MATRIX. <br /><br /> Result.. The value interpolated from near-by grid points to the <br /> rotated array. <br /><br /> Example. ?? <br /><br /> |
- | |} | + | |
+ | <span id="max"></span> | ||
+ | ==MAX (A1,A2,A3,...)== | ||
+ | |||
+ | F90 Numeric Elemental. Maximum value. <br /><br /> Arguments Integer or real. Complex numbers are an error. <br /><br /> Signals. The single signal or the smallest. <br /> Units... The single or matching units, else bad. <br /> Form.... The compatible form of all the arguments. Conversion is <br /> done pairwise. <br /><br /> Result.. The largest argument. A reserved operand will dominate. <br /><br /> Example. MAX(-9.0,7.0,2.0) is 7.0. <br /><br /> | ||
+ | |||
+ | <span id="maxexponent"></span> | ||
+ | ==MAXEXPONENT (X)== | ||
+ | |||
+ | F90 Inquiry. The maximum exponent in the model representing numbers of <br /> the same type as the argument. <br /><br /> Argument. X is real, scalar or array. <br /><br /> Signals. None. <br /> Units... None. <br /> Form.... Integer scalar. <br /><br /> Result.. The number emax for the model of the same type as X. <br /> Example. MAXEXPONENT(1.0) is 127 on the VAX. <br /><br /> | ||
+ | |||
+ | <span id="maxloc"></span> | ||
+ | ==MAXLOC (ARRAY,[MASK])== | ||
+ | |||
+ | F90 Transformation. Determine the location of an element of ARRAY with <br /> the maximum value of the elements identified by MASK. <br /><br /> Arguments Optional: MASK. <br /> ARRAY numeric array. <br /> MASK logical and conformable with ARRAY. <br /><br /> Signals. None. <br /> Units... None. <br /> Form.... Long vector of size equal to rank of ARRAY. <br /><br /> Result.. The result is the vector of subscripts of an element <br /> whose value equals the maximum of all elements of ARRAY <br /> or all elements for which MASK is true. Reserved <br /> operands ($ROPRAND) are ignored. Each subscript will <br /> be in the extent of its dimension. For zero size, no <br /> true elements in MASK, or all $ROPRAND the result is <br /> undefined. If more than one element has the maximum <br /> value the result is the first in array order. The result <br /> is an offset vector even if there is a lower bound. <br /><br /> Examples. MAXLOC([2,4,6]) is [2]. <br /> For _A=[0 -5 8 -3], MAXLOC(_A,_A LT 6) is [2,1]. <br /> [3 4 -1 2] <br /> [1 5 6 -4] <br /><br /> See also. MAXVAL for the value. <br /><br /> | ||
+ | |||
+ | <span id="maxval"></span> | ||
+ | ==MAXVAL (ARRAY,[DIM],[MASK])== | ||
+ | |||
+ | F90 Transformation. Maximum value of the elements of ARRAY along <br /> dimension DIM corresponding to true elements of MASK. <br /><br /> Arguments Optional: DIM, MASK. <br /> ARRAY numeric array. <br /> DIM integer scalar from 0 to n-1, where n is rank of ARRAY. <br /> MASK logical and conformable to ARRAY. <br /><br /> Signals. Same as ARRAY if DIM-th or all dimensions omitted. <br /> Units... Same as ARRAY. <br /> Form.... Same type as ARRAY. It is a scalar if DIM is absent or <br /> ARRAY is scalar or vector. Otherwise, the result is an <br /> array of rank n-1 and shaped like ARRAY with DIM <br /> subscript omitted. <br /><br /> Result.. The result without DIM is the maximum value of the <br /> elements of ARRAY, testing only those with true MASK <br /> values and value not equal to the reserved operand <br /> ($ROPRAND). With DIM, the value of an element of the <br /> result is the maximum of ARRAY elements with DIM <br /> dimension fixed as the element number of the result. <br /> If no value is found, -HUGE(ARRAY) is returned. <br /><br /> Examples. MAXVAL([1,2,3]) is 3. MAXVAL(_C,,_C LT 0) finds the <br /> maximum negative element of C. If <br /> _B=[1 3 5], <br /> [2 4 6] <br /> MAXVAL(_B,0) is [2,4,6] and MAXVAL(_B,1) is [5,6]. <br /><br /> See also. MAXLOC for the location. <br /><br /> | ||
+ | |||
+ | <span id="mean"></span> | ||
+ | ==MEAN (ARRAY,[DIM],[MASK])== | ||
+ | |||
+ | Transformation. Average value of the elements of ARRAY along dimension <br /> DIM corresponding to the true elements of MASK. <br /><br /> Arguments Optional: DIM, MASK. <br /> ARRAY numeric array. <br /> DIM integer scalar from 0 to n-1, where n is rank of ARRAY. <br /> MASK logical and conformable to ARRAY. <br /><br /> Signals. Same as ARRAY if DIM-th or all dimensions omitted. <br /> Units... Same as ARRAY. <br /> Form.... Same type as ARRAY. It is a scalar if DIM is absent or <br /> ARRAY is scalar or vector. Otherwise, the result is an <br /> array of rank n-1 and shaped like ARRAY with DIM <br /> subscript omitted. <br /><br /> Result.. The result without DIM is the mean value of the elements <br /> of ARRAY, testing only those with true MASK values and <br /> value not equal to the reserved operand ($ROPRAND). With <br /> DIM, the value of an element of the result is the mean <br /> of ARRAY elements with dimension DIM fixed as the <br /> element number of the result. <br /> If no value is found, zero is given. <br /><br /> Examples. MEAN([1,2,3]) is 2. MEAN(_C,,_C GT 0) finds the mean of <br /> positive element of C. If _B=[1 3 5], <br /> [2 4 6] <br /> MEAN(_B,0) is [1,3,5] and MEAN(_B,1) is [3,4]. <br /><br /> | ||
+ | |||
+ | <span id="median"></span> | ||
+ | ==median (ARRAY,WIDTH)== | ||
+ | |||
+ | Transformation. Median filter of specified width or area. <br /><br /> Arguments <br /> ARRAY integer or real, vector or rank-two array. <br /> WIDTH integer scalar. <br /><br /> Signals. Same as ARRAY. <br /> Units... Same as ARRAY. <br /> Form.... Same as ARRAY. <br /><br /> Result.. Each element at least WIDTH/2 from the edge is median of <br /> the values WIDTH/2 on each side of it. The perimeter is <br /> equal to the first interior value. (subject to change) <br /><br /> Example. ?? <br /><br /> | ||
+ | |||
+ | <span id="merge"></span> | ||
+ | ==MERGE (TSOURCE,FSOURCE,MASK)== | ||
+ | |||
+ | F90 Logical Elemental. Choose alternative value according to a mask. <br /><br /> Arguments <br /> TSOURCE any type compatible with FSOURCE. <br /> FSOURCE any type compatible with TSOURCE. <br /> MASK logical, conformable with TSOURCE and FSOURCE. <br /><br /> Signals. Single signal or smaller data. <br /> Units... Single or common units (excluding MASK), else bad. <br /> Form.... The type is the compatible type of FSOURCE and TSOURCE. <br /> The shape conformable to FSOURCE, TSOURCE, and MASK. <br /><br /> Result.. If the MASK value is true, the TSOURCE value is use; <br /> otherwise, the FSOURCE value is use. <br /><br /> Examples. MERGE([1,2,3],[4,5,6],[$TRUE,$FALSE,$TRUE]) is [1,5,3]. <br /> If TSOURCE is the array [1 6 5], FSOURCE is the array <br /> [2 4 6] <br /> [0 3 2] and MASK is [1 0 1], <br /> [7 4 8] [0 0 1] <br /> then MERGE(TSOURCE,FSOURCE,MASK) <br /> is [1 3 5]. <br /> [7 4 6] <br /><br /> See also. CONDITIONAL with form: MASK ? TSOURCE : FSOURCE, for <br /> scalar mask test. <br /><br /> | ||
+ | |||
+ | <span id="kind"></span> | ||
+ | ==METHOD_OF (A)== | ||
+ | |||
+ | MDS Operation. Get the method field. <br /><br /> Argument. Descriptor as below. <br /><br /> Result.. A is searched for this: <br /> DSC$K_DTYPE_METHOD, the method field. <br /> Otherwise, an error. <br /><br /> | ||
+ | |||
+ | <span id="min"></span> | ||
+ | ==MIN (A1,A2,A3,...)== | ||
+ | |||
+ | F90 Numeric Elemental. Minimum value. <br /><br /> Arguments Integer or real. Complex numbers are an error. <br /><br /> Signals. The single signal or the smallest. <br /> Units... The single or matching units, else bad. <br /> Form.... The compatible form of all the arguments. Conversion is <br /> done pairwise. <br /><br /> Result.. The smallest argument. A reserved operand will dominate. <br /><br /> Example. MIN(-9.0,7.0,2.0) is -9.0. <br /><br /> | ||
+ | |||
+ | <span id="minexponent"></span> | ||
+ | ==MINEXPONENT (X)== | ||
+ | |||
+ | F90 Inquiry. The minimum exponent in the model representing numbers of <br /> the same type as the argument. <br /><br /> Argument. X must be real or complex, scalar or array. <br /><br /> Signals. None. <br /> Units... None. <br /> Form.... Integer scalar. <br /><br /> Result.. The number emin for the model of the same type as X. <br /><br /> Example. MINEXPONENT(1.0) is -127 on the VAX. <br /><br /> | ||
+ | |||
+ | <span id="minloc"></span> | ||
+ | ==MINLOC (ARRAY,[MASK])== | ||
+ | |||
+ | F90 Transformation. Determine the location of an element of ARRAY <br /> having the minimum value of the elements identified by MASK. <br /><br /> Arguments Optional: MASK. <br /> ARRAY numeric array. <br /> MASK logical and conformable with ARRAY. <br /><br /> Signals. None. <br /> Units... None. <br /> Form.... Long vector of size equal to rank of ARRAY. <br /><br /> Result.. The result is the vector of subscripts of an element <br /> whose value equals the minimum of all elements of ARRAY <br /> or all elements for which MASK is true. Reserved <br /> operands ($ROPRAND) are ignored. Each subscript will <br /> be in the extent of its dimension. For zero size, no <br /> true elements in MASK, or all $ROPRAND the result is <br /> undefined. If more than one element has the maximum <br /> value the result is the first in array order. The result <br /> is an offset vector even if there is a lower bound. <br /><br /> Examples. MINLOC([2,4,6]) is [0]. <br /> For _A=[0 -5 8 -3], MINLOC(_A,_A GT -4) is [0,3]. <br /> [3 4 -1 2] <br /> [1 5 6 -4] <br /><br /> See also. MINVAL for the value. <br /><br /> | ||
+ | |||
+ | <span id="minval"></span> | ||
+ | ==MINVAL (ARRAY,[DIM],[MASK])== | ||
+ | |||
+ | F90 Transformation. Minimum value of the elements of ARRAY along <br /> dimension DIM corresponding to true elements of MASK. <br /><br /> Arguments Optional: DIM, MASK. <br /> ARRAY numeric array. <br /> DIM integer scalar from 0 to n-1, where n is rank of ARRAY. <br /> MASK logical and conformable to ARRAY. <br /><br /> Signals. Same as ARRAY if DIM-th or all dimensions omitted. <br /> Units... Same as ARRAY. <br /> Form.... Same type as ARRAY. It is a scalar if DIM is absent or <br /> ARRAY is scalar or vector. Otherwise, the result is an <br /> array of rank n-1 and shaped like ARRAY with DIM <br /> subscript omitted. <br /> Result.. The result without DIM is the minimum value of the <br /> elements of ARRAY, testing only those with true MASK <br /> values and value not equal to the reserved operand <br /> ($ROPRAND). With DIM, the value of an element of the <br /> result is the minimum of ARRAY elements with DIM <br /> dimension fixed as the element number of the result. <br /> If no value is found, +HUGE(ARRAY) is returned. <br /><br /> Examples. MINVAL([1,2,3]) is 3. MINVAL(_C,,_C GT 0) finds the <br /> minimum positive element of C. <br /> If _B=[1 3 5], <br /> [2 4 6] <br /> MINVAL(_B,0) is [1,3,5] and MINVAL(_B,1) is [1,2]. <br /><br /> See also. MINLOC for the location. <br /><br /> | ||
+ | |||
+ | <span id="mod"></span> | ||
+ | ==MOD (A,P)== | ||
+ | |||
+ | F90 Numeric Elemental. Remainder. <br /> Usual Form A MOD P. <br /><br /> Arguments A and P must be integer or real. <br /> Complex numbers are an error. <br /><br /> Signals. Single signal or smaller data. <br /> Units... Single or common units, else bad. <br /> Form.... Compatible form of A and P. <br /><br /> Result.. If P NE 0, the result is A-INT(A/P)*P. If P==0, the result <br /> is the $ROPRAND for reals and undefined for integers. <br /><br /> Examples. MOD(3.0,2.0) is 1.0. MOD(8,5) is 3. MOD(-8,5) is -3. <br /> MOD(8,-5) is -3. MOD(-8,-5) is -3. <br /><br /> | ||
+ | |||
+ | <span id="model_of"></span> | ||
+ | ==MODEL_OF (A)== | ||
+ | |||
+ | MDS Operation. Get the model field. <br /><br /> Argument. Descriptor as below. <br /><br /> Result.. A is searched for this: <br /> DSC$K_DTYPE_CONGLOM, the model field. <br /> Otherwise, an error. <br /><br /> | ||
+ | |||
+ | <span id="modulo"></span> | ||
+ | ==modulo (A,P)== | ||
+ | |||
+ | F90 Numeric Elemental. Remainder. <br /> Usual Form A MODULO P. <br /><br /> Arguments A and P must be integer or real. <br /> Complex numbers are an error. <br /><br /> Signals. Single signal or smaller data. <br /> Units... Single or common units, else bad. <br /> Form.... Compatible form of A and P. <br /><br /> Result.. If P NE 0, the result is A-FLOOR(REAL(A)/(REAL)P)*P. <br /> If P==0, the result is the $ROPRAND for reals and <br /> undefined for integers. <br /> Examples. MODULO(8,5) is 3. MODULO(-8,5) is 2. <br /> MODULO(8,-5) is -2. MODULO(-8,-5) is -3. <br /><br /> | ||
+ | |||
+ | <span id="multiply"></span> | ||
+ | ==MULTIPLY (X,Y)== | ||
+ | |||
+ | Numeric Elemental. Multiplication. <br /> Usual Form X * Y. <br /> Function Form MULTIPLY(X,Y). <br /><br /> Arguments X and Y must be numeric. <br /><br /> Signals. Single signal or smaller data. <br /> Units... Those of X joined with those of Y by an asterisk. <br /> Form.... Compatible form of X and Y. <br /><br /> Result.. Product of corresponding elements of X and Y. <br /> >>>>>>>>>WARNING, integer overflow is ignored. <br /><br /> Examples. 3.0 * 2 is 6.0. BUILD_WITH_UNITS(3.0,"V") <br /> * BUILD_SIGNAL(BUILD_WITH_UNITS($VALUE*2,"s"),4)) is <br /> BUILD_SIGNAL(BUILD_WITH_UNITS(24.0,"V*s"),4). |