MinMax
Declaration: |
TMatrix.MinMax (LowCol, LowRow, HighCol, HighRow: integer; var Minimum, Maximum: double); |
The method MinMax calculates the minimum and the maximum value of all matrix elements within a specific area. The range of the matrix elements to be used is determined by the parameters LowCol, LowRow, LowLayer, HighCol, HighRow, and HighLayer. If any of these parameters receives an invalid value, this value is automatically adjusted to the lowest or highest allowed value (1 for the "Low..." parameters, and NrOfColumns /NrOfRows for the "High...." parameters).
The variable parameters Minimum and Maximum return the lowest and the highest value of the selected data.
|
Hint: |
Setting both the low and high parameter of a dimension (i.e. LowCol and HighCol) to zero values forces the method to use all elements of that dimension. |
Example: |
The statement Mat1.MinMax (1,2,12,18,RMin,RMax); calculates the lowest and the highest value of all matrix elements with the indices [1,2] to [12,18], and returns them in the variables RMin and RMax. |
|